mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
d24c220d04
commit
d6c6c0767c
1 changed files with 5 additions and 5 deletions
|
@ -1197,16 +1197,16 @@ static int parse_albumart_load(struct skin_element* element,
|
||||||
/* if we got here, we parsed everything ok .. ! */
|
/* if we got here, we parsed everything ok .. ! */
|
||||||
if (aa->width < 0)
|
if (aa->width < 0)
|
||||||
aa->width = 0;
|
aa->width = 0;
|
||||||
else if (aa->width > LCD_WIDTH)
|
else if (aa->width > curr_vp->vp.width)
|
||||||
aa->width = LCD_WIDTH;
|
aa->width = curr_vp->vp.width;
|
||||||
|
|
||||||
if (aa->height < 0)
|
if (aa->height < 0)
|
||||||
aa->height = 0;
|
aa->height = 0;
|
||||||
else if (aa->height > LCD_HEIGHT)
|
else if (aa->height > curr_vp->vp.height)
|
||||||
aa->height = LCD_HEIGHT;
|
aa->height = curr_vp->vp.height;
|
||||||
|
|
||||||
if (swap_for_rtl)
|
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;
|
aa->state = WPS_ALBUMART_LOAD;
|
||||||
wps_data->albumart = PTRTOSKINOFFSET(skin_buffer, aa);
|
wps_data->albumart = PTRTOSKINOFFSET(skin_buffer, aa);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue