diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2023-11-17 15:56:04 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2023-11-18 10:29:47 -0500 |
commit | 35f9a5b41501502d6bb21cad64be515a73bc360c (patch) | |
tree | d366f9d6e324a79679b939954872438c9260cec9 | |
parent | 51148279373fd903c87536362540f89097bef7f3 (diff) | |
download | rockbox-35f9a5b415.tar.gz rockbox-35f9a5b415.zip |
Skin Engine: Fix loading images with same file name
Looks like this was a regression introduced in 01cbb79.
The duplicate img uses an existing buflib handle for
the data, but still didn't have access to the dimensions
from the bitmap struct.
Test case: DancePuffDuo theme for Sansa E200. Only one
dancepuff was displayed. Thank you to goatikins for
reporting the issue.
Change-Id: I32c3ebd1f00738f7db52e7a66f98c4ab3489ee4a
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index a7e55c2e0e..4d1526fcbc 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -2007,6 +2007,7 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir) { struct skin_token_list *imglist = SKINOFFSETTOPTR(skin_buffer, list->next); img->subimage_height = img->bm.height / img->num_subimages; + struct bitmap* loaded_bm = &img->bm; while (imglist) { token = SKINOFFSETTOPTR(skin_buffer, imglist->token); @@ -2016,6 +2017,7 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir) { img->loaded = true; img->buflib_handle = handle; + img->bm = *loaded_bm; img->subimage_height = img->bm.height / img->num_subimages; } } |