summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_parser.c
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 /apps/gui/skin_engine/skin_parser.c
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
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-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,
/* if we got here, we parsed everything ok .. ! */
if (aa->width < 0)
aa->width = 0;
- else if (aa->width > LCD_WIDTH)
- aa->width = LCD_WIDTH;
+ else if (aa->width > curr_vp->vp.width)
+ aa->width = curr_vp->vp.width;
if (aa->height < 0)
aa->height = 0;
- else if (aa->height > LCD_HEIGHT)
- aa->height = LCD_HEIGHT;
+ else if (aa->height > curr_vp->vp.height)
+ aa->height = curr_vp->vp.height;
if (swap_for_rtl)
- aa->x = LCD_WIDTH - (aa->x + aa->width);
+ aa->x = (curr_vp->vp.width - aa->width - aa->x);
aa->state = WPS_ALBUMART_LOAD;
wps_data->albumart = PTRTOSKINOFFSET(skin_buffer, aa);