summaryrefslogtreecommitdiff
path: root/apps/gui/usb_screen.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-12-09 07:25:46 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-12-09 07:25:46 +0000
commitb2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24 (patch)
treeff3c0e14e9a53c08749ee1f233a5b1e887d3561a /apps/gui/usb_screen.c
parent85aad9b3972208b0e34ba0241ebb5314118ae05e (diff)
downloadrockbox-b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24.tar.gz
rockbox-b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24.zip
FS#10824 - viewport/statusbar API rework.
Hopefully the only user visible changes are: - fm and recording screens go by the statusbar setting (sbs or inbuilt) - plugins go back to using the theme as they should for menus and lists - splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later. - hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed New GUI screen rules: * Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit * Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly. ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/usb_screen.c')
-rw-r--r--apps/gui/usb_screen.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index f6285f995e..29d88daf06 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -150,7 +150,7 @@ static void usb_screen_fix_viewports(struct screen *screen,
150 150
151 viewport_set_defaults(parent, screen->screen_type); 151 viewport_set_defaults(parent, screen->screen_type);
152 if (parent->width < logo_width || parent->height < logo_height) 152 if (parent->width < logo_width || parent->height < logo_height)
153 viewport_set_fullscreen(parent, screen->screen_type); 153 viewportmanager_theme_enable(screen->screen_type, false, parent);
154 154
155 *logo = *parent; 155 *logo = *parent;
156 logo->x = parent->x + parent->width - logo_width; 156 logo->x = parent->x + parent->width - logo_width;
@@ -180,8 +180,6 @@ static void usb_screen_fix_viewports(struct screen *screen,
180static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar) 180static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
181{ 181{
182 int i; 182 int i;
183 int usb_bars = VP_SB_ALLSCREENS; /* force statusbars */
184
185 lcd_clear_display(); 183 lcd_clear_display();
186#ifdef HAVE_LCD_REMOTE 184#ifdef HAVE_LCD_REMOTE
187 lcd_remote_clear_display(); 185 lcd_remote_clear_display();
@@ -236,18 +234,12 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
236 234
237 screen->update_viewport(); 235 screen->update_viewport();
238 screen->set_viewport(NULL); 236 screen->set_viewport(NULL);
239
240 /* force statusbar by ignoring the setting */
241 usb_bars |= VP_SB_IGNORE_SETTING(i);
242 } 237 }
243
244 viewportmanager_set_statusbar(usb_bars);
245} 238}
246 239
247void gui_usb_screen_run(void) 240void gui_usb_screen_run(void)
248{ 241{
249 int i; 242 int i;
250 int old_bars = viewportmanager_get_statusbar();
251 struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS]; 243 struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
252#if defined HAVE_TOUCHSCREEN 244#if defined HAVE_TOUCHSCREEN
253 enum touchscreen_mode old_mode = touchscreen_get_mode(); 245 enum touchscreen_mode old_mode = touchscreen_get_mode();
@@ -319,9 +311,8 @@ void gui_usb_screen_run(void)
319 FOR_NB_SCREENS(i) 311 FOR_NB_SCREENS(i)
320 { 312 {
321 screens[i].backlight_on(); 313 screens[i].backlight_on();
314 viewportmanager_theme_undo(i);
322 } 315 }
323 viewportmanager_set_statusbar(old_bars);
324 send_event(GUI_EVENT_REFRESH, NULL);
325 316
326} 317}
327#endif /* !defined(USB_NONE) */ 318#endif /* !defined(USB_NONE) */