summaryrefslogtreecommitdiff
path: root/apps/recorder/albumart.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/albumart.c')
-rw-r--r--apps/recorder/albumart.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index 7715287d46..bb2fae4af7 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -323,33 +323,33 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
323 if (bufgetdata(handle_id, 0, (void *)&bmp) <= 0) 323 if (bufgetdata(handle_id, 0, (void *)&bmp) <= 0)
324 return; 324 return;
325 325
326 short x = aa->albumart_x; 326 short x = aa->x;
327 short y = aa->albumart_y; 327 short y = aa->y;
328 short width = bmp->width; 328 short width = bmp->width;
329 short height = bmp->height; 329 short height = bmp->height;
330 330
331 if (aa->albumart_max_width > 0) 331 if (aa->width > 0)
332 { 332 {
333 /* Crop if the bitmap is too wide */ 333 /* Crop if the bitmap is too wide */
334 width = MIN(bmp->width, aa->albumart_max_width); 334 width = MIN(bmp->width, aa->width);
335 335
336 /* Align */ 336 /* Align */
337 if (aa->albumart_xalign & WPS_ALBUMART_ALIGN_RIGHT) 337 if (aa->xalign & WPS_ALBUMART_ALIGN_RIGHT)
338 x += aa->albumart_max_width - width; 338 x += aa->width - width;
339 else if (aa->albumart_xalign & WPS_ALBUMART_ALIGN_CENTER) 339 else if (aa->xalign & WPS_ALBUMART_ALIGN_CENTER)
340 x += (aa->albumart_max_width - width) / 2; 340 x += (aa->width - width) / 2;
341 } 341 }
342 342
343 if (aa->albumart_max_height > 0) 343 if (aa->height > 0)
344 { 344 {
345 /* Crop if the bitmap is too high */ 345 /* Crop if the bitmap is too high */
346 height = MIN(bmp->height, aa->albumart_max_height); 346 height = MIN(bmp->height, aa->height);
347 347
348 /* Align */ 348 /* Align */
349 if (aa->albumart_yalign & WPS_ALBUMART_ALIGN_BOTTOM) 349 if (aa->yalign & WPS_ALBUMART_ALIGN_BOTTOM)
350 y += aa->albumart_max_height - height; 350 y += aa->height - height;
351 else if (aa->albumart_yalign & WPS_ALBUMART_ALIGN_CENTER) 351 else if (aa->yalign & WPS_ALBUMART_ALIGN_CENTER)
352 y += (aa->albumart_max_height - height) / 2; 352 y += (aa->height - height) / 2;
353 } 353 }
354 354
355 if (!clear) 355 if (!clear)