summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2014-01-12 18:44:43 +0100
committerSzymon Dziok <b0hoon@o2.pl>2014-01-13 21:46:57 +0100
commitbac85f2cb446a502b799cf0e0a80cd21ea05edc4 (patch)
treef40c1a596c546dc96724887c3695b2530ca2eede
parent621d74e5f953926fd1ab7c8de1b664bc7fc57e2c (diff)
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
-rw-r--r--apps/gui/usb_screen.c6
1 files 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