From 2c6be5647a883d5f0aeb4d7f15b3ac9939c8d8c7 Mon Sep 17 00:00:00 2001 From: Ningyuan Li Date: Mon, 25 Mar 2024 01:20:37 +0900 Subject: [PATCH] fixed lvgl color format on webOS --- src/app/ui/launcher/coverloader.c | 6 +++--- third_party/lvgl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/ui/launcher/coverloader.c b/src/app/ui/launcher/coverloader.c index f80b03e88..58b9a4f41 100644 --- a/src/app/ui/launcher/coverloader.c +++ b/src/app/ui/launcher/coverloader.c @@ -302,9 +302,9 @@ static bool coverloader_filecache_get(coverloader_req_t *req) { SDL_FreeSurface(decoded); return false; } - // With SDL 2.30.0 and above, 24 bit images are broken on webOS - if (decoded->format->palette != NULL || decoded->format->BitsPerPixel < 32) { - SDL_Surface *true_color = SDL_ConvertSurfaceFormat(decoded, SDL_PIXELFORMAT_ABGR32, 0); + // Indexed images needs to be converted to true color before scaling + if (decoded->format->palette != NULL) { + SDL_Surface *true_color = SDL_ConvertSurfaceFormat(decoded, SDL_PIXELFORMAT_RGBX32, 0); SDL_FreeSurface(decoded); if (true_color == NULL) { return false; diff --git a/third_party/lvgl b/third_party/lvgl index cc1ee05f1..185ea1fc6 160000 --- a/third_party/lvgl +++ b/third_party/lvgl @@ -1 +1 @@ -Subproject commit cc1ee05f18378f7b5d56456c090651c84db596a3 +Subproject commit 185ea1fc61dd01fac61867d2d6b56892e80c6058