summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-29 15:17:16 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-29 15:17:16 +0000
commitcc1be6b76696d5f4fafe5a3164f6b13fc5086356 (patch)
treead9514d4e05638ec5388603c1714aa5d45c00a5c
parentbd023385fba320bb849b1acf80e0873933045e88 (diff)
downloadrockbox-cc1be6b76696d5f4fafe5a3164f6b13fc5086356.tar.gz
rockbox-cc1be6b76696d5f4fafe5a3164f6b13fc5086356.tar.bz2
rockbox-cc1be6b76696d5f4fafe5a3164f6b13fc5086356.zip
More fixes for the usb screen: Use send_event(GUI_EVENT_REFRESH, NULL) to get rid of dead parts if the custom ui viewport is used as intended (it also redraws the statusbars additionally to clear&update). Redo the the statusbar handling to use the viewportmanager to properly force the remote statusbar on also.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22534 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/screens.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/apps/screens.c b/apps/screens.c
index 036e2a8f06..1e177db42d 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -63,6 +63,8 @@
#include "yesno.h"
#include "backdrop.h"
#include "viewport.h"
+#include "appevents.h"
+#include "statusbar.h"
#ifdef HAVE_LCD_BITMAP
#include "bitmaps/usblogo.h"
@@ -181,16 +183,15 @@ void usb_screen(void)
/* nothing here! */
#else
int i;
- int statusbar = global_settings.statusbar; /* force the statusbar */
- if(!global_settings.statusbar)
- global_settings.statusbar = STATUSBAR_TOP;
+ int usb_bars = VP_SB_ALLSCREENS; /* force statusbars */
+ int old_bars = viewportmanager_get_statusbar();
FOR_NB_SCREENS(i)
{
screens[i].backdrop_show(BACKDROP_MAIN);
screens[i].backlight_on();
screens[i].clear_display();
-#if NB_SCREENS > 1
+#ifdef HAVE_REMOTE_LCD
if (i == SCREEN_REMOTE)
{
screens[i].bitmap(remote_usblogo,
@@ -199,8 +200,8 @@ void usb_screen(void)
BMPWIDTH_remote_usblogo, BMPHEIGHT_remote_usblogo);
}
else
- {
#endif
+ {
#ifdef HAVE_LCD_BITMAP
screens[i].transparent_bitmap(usblogo,
(LCD_WIDTH-BMPWIDTH_usblogo),
@@ -213,11 +214,12 @@ void usb_screen(void)
status_set_audio(false);
status_set_usb(true);
#endif /* HAVE_LCD_BITMAP */
-#if NB_SCREENS > 1
}
-#endif
screens[i].update();
}
+ FOR_NB_SCREENS(i)
+ usb_bars |= VP_SB_IGNORE_SETTING(i);
+ viewportmanager_set_statusbar(usb_bars);
#ifdef SIMULATOR
while (button_get(true) & BUTTON_REL);
@@ -231,10 +233,10 @@ void usb_screen(void)
FOR_NB_SCREENS(i)
{
screens[i].backlight_on();
- screens[i].clear_display();
- screens[i].update();
}
- global_settings.statusbar = statusbar;
+ viewportmanager_set_statusbar(old_bars);
+ send_event(GUI_EVENT_REFRESH, NULL);
+
#endif /* USB_NONE */
}