Skip to content

Commit

Permalink
fixed lvgl color format on webOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Mar 24, 2024
1 parent 684a875 commit 276cdbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/ui/launcher/coverloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 276cdbd

Please sign in to comment.