summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2013-01-15 23:10:37 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2013-01-15 23:10:37 +1100
commitd6c6c0767cdf78e98789c067d680e09804641c82 (patch)
tree6ca7a9a4d51b8c11dff036f6117528fbfbe5a8ab
parentd24c220d04876a886b0ae3bdef23309c9e29c1c0 (diff)
downloadrockbox-d6c6c0767cdf78e98789c067d680e09804641c82.tar.gz
rockbox-d6c6c0767cdf78e98789c067d680e09804641c82.zip
album art display: Fix RTL handling for the album art skin tag
AA was broken when an RTL language is used, causing it to not be displayed. Also fix th out of bounds handling when width/height > viewport Change-Id: I4899cd32ec58107c987e3cc0e8df582963bdcf62
-rw-r--r--apps/gui/skin_engine/skin_parser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 94adaf3116..adfda54335 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1197,16 +1197,16 @@ static int parse_albumart_load(struct skin_element* element,
1197 /* if we got here, we parsed everything ok .. ! */ 1197 /* if we got here, we parsed everything ok .. ! */
1198 if (aa->width < 0) 1198 if (aa->width < 0)
1199 aa->width = 0; 1199 aa->width = 0;
1200 else if (aa->width > LCD_WIDTH) 1200 else if (aa->width > curr_vp->vp.width)
1201 aa->width = LCD_WIDTH; 1201 aa->width = curr_vp->vp.width;
1202 1202
1203 if (aa->height < 0) 1203 if (aa->height < 0)
1204 aa->height = 0; 1204 aa->height = 0;
1205 else if (aa->height > LCD_HEIGHT) 1205 else if (aa->height > curr_vp->vp.height)
1206 aa->height = LCD_HEIGHT; 1206 aa->height = curr_vp->vp.height;
1207 1207
1208 if (swap_for_rtl) 1208 if (swap_for_rtl)
1209 aa->x = LCD_WIDTH - (aa->x + aa->width); 1209 aa->x = (curr_vp->vp.width - aa->width - aa->x);
1210 1210
1211 aa->state = WPS_ALBUMART_LOAD; 1211 aa->state = WPS_ALBUMART_LOAD;
1212 wps_data->albumart = PTRTOSKINOFFSET(skin_buffer, aa); 1212 wps_data->albumart = PTRTOSKINOFFSET(skin_buffer, aa);