From f57d0220dd216937a210a18f8ab8394091bb6a08 Mon Sep 17 00:00:00 2001 From: Kevin Ferrare Date: Tue, 22 Nov 2005 21:55:05 +0000 Subject: Adapted and commited Markus Kaufhold's remote hold icon on statusbar patch for iriver ; generic logo handler (now it's possible to have a different USB logo on main screen and on remote), made the quickscreen behave as it was before git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8044 a1c6a512-1295-4272-9138-f99709370657 --- apps/screens.c | 70 ++++++---------------------------------------------------- 1 file changed, 7 insertions(+), 63 deletions(-) (limited to 'apps/screens.c') diff --git a/apps/screens.c b/apps/screens.c index 9ff2e1b952..368a185073 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -16,6 +16,7 @@ * KIND, either express or implied. * ****************************************************************************/ + #include #include #include @@ -51,6 +52,7 @@ #include "statusbar.h" #include "screen_access.h" #include "quickscreen.h" +#include "logo.h" #if defined(HAVE_LCD_BITMAP) #include "widgets.h" @@ -64,66 +66,8 @@ #ifdef HAVE_LCD_BITMAP #define SCROLLBAR_WIDTH 6 - -#define BMPHEIGHT_usb_logo 32 -#define BMPWIDTH_usb_logo 100 -static const unsigned char usb_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, - 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, - 0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, - 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c, - 0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01, - 0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, - 0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, - 0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3, - 0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02, - 0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0, - 0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, -}; #endif -void usb_display_info(struct screen * display) -{ - display->clear_display(); - -#ifdef HAVE_LCD_BITMAP - /* Center bitmap on screen */ - display->mono_bitmap(usb_logo, - display->width/2-BMPWIDTH_usb_logo/2, - display->height/2-BMPHEIGHT_usb_logo/2, - BMPWIDTH_usb_logo, - BMPHEIGHT_usb_logo); - display->update(); -#else - display->double_height(false); - display->puts(0, 0, "[USB Mode]"); -#ifdef SIMULATOR - display->update(); -#endif /* SIMULATOR */ -#endif /* HAVE_LCD_BITMAP */ -} - void usb_screen(void) { #ifdef USB_NONE @@ -132,7 +76,7 @@ void usb_screen(void) int i; FOR_NB_SCREENS(i) { screens[i].backlight_on(); - usb_display_info(&screens[i]); + gui_logo_draw(&usb_logos[i], &screens[i]); } #ifdef HAVE_LCD_CHARCELLS status_set_param(false); @@ -542,7 +486,7 @@ void quick_screen_quick_apply(struct gui_quickscreen *qs) global_settings.repeat_mode=option_select_get_selected(qs->right_option); } -bool quick_screen_quick(void) +bool quick_screen_quick(int button_enter) { bool res, oldrepeat; struct option_select left_option; @@ -589,7 +533,7 @@ bool quick_screen_quick(void) gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, str(LANG_F2_MODE), &quick_screen_quick_apply); oldrepeat=global_settings.repeat_mode; - res=gui_syncquickscreen_run(&qs); + res=gui_syncquickscreen_run(&qs, button_enter); if(!res) { if ( oldrepeat != global_settings.repeat_mode && @@ -624,7 +568,7 @@ void quick_screen_f3_apply(struct gui_quickscreen *qs) gui_syncstatusbar_draw(&statusbars, true); } -bool quick_screen_f3(void) +bool quick_screen_f3(int button_enter) { bool res; struct option_select left_option; @@ -658,7 +602,7 @@ bool quick_screen_f3(void) 2); gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, str(LANG_F3_BAR), &quick_screen_f3_apply); - res=gui_syncquickscreen_run(&qs); + res=gui_syncquickscreen_run(&qs, button_enter); if(!res) settings_save(); return(res); -- cgit v1.2.3