From bac85f2cb446a502b799cf0e0a80cd21ea05edc4 Mon Sep 17 00:00:00 2001 From: Szymon Dziok Date: Sun, 12 Jan 2014 18:44:43 +0100 Subject: Always check, if the USB logo for remotes overrides their physical size. This fixes displaying of the main USB screen on m:robe 100. A remote for this particular target has no native remote USB logo and it uses a larger one. However it's a good idea to perform this check always IMHO. Change-Id: I56ceb2316c551269be011b60271d8da11cb8b073 --- apps/gui/usb_screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index e5bc12960e..ff437ca10a 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c @@ -142,8 +142,10 @@ static void usb_screen_fix_viewports(struct screen *screen, #ifdef HAVE_REMOTE_LCD if (screen->screen_type == SCREEN_REMOTE) { - logo_width = BMPWIDTH_remote_usblogo; - logo_height = BMPHEIGHT_remote_usblogo; + logo_width = (BMPWIDTH_remote_usblogo > LCD_REMOTE_WIDTH) ? + LCD_REMOTE_WIDTH : BMPWIDTH_remote_usblogo; + logo_height = (BMPHEIGHT_remote_usblogo > LCD_REMOTE_HEIGHT) ? + LCD_REMOTE_HEIGHT : BMPHEIGHT_remote_usblogo; } else #endif -- cgit v1.2.3