futile attempt to keep the ondioSP rombox working. This will almost certainly be the last release with it. (The backdrop API is chaning very soon after release so this is no big deal)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24340 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-01-27 06:47:56 +00:00
parent 27b8b73b86
commit 2565389402
8 changed files with 27 additions and 37 deletions

View file

@ -194,7 +194,11 @@ bool bookmark_autobookmark(void)
const struct text_message message={lines, 2};
#endif
FOR_NB_SCREENS(i)
{
#if LCD_DEPTH > 1
screens[i].backdrop_show(BACKDROP_MAIN);
#endif
}
if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES)
{

View file

@ -37,23 +37,6 @@ void backdrop_unload(enum backdrop_type bdrop);
void backdrop_show(enum backdrop_type bdrop);
void backdrop_hide(void);
#else /* LCD_DEPTH <= 1 || __PCTOOL__ */
static inline bool backdrop_load(enum backdrop_type bdrop, const char* filename)
{
(void)filename; (void)bdrop; return true;
}
static inline void backdrop_unload(enum backdrop_type bdrop)
{
(void)bdrop;
}
static inline void backdrop_show(enum backdrop_type bdrop)
{
(void)bdrop;
}
static inline void backdrop_hide(void) {}
#endif
#if defined(HAVE_REMOTE_LCD)
@ -63,23 +46,6 @@ bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename);
void remote_backdrop_unload(enum backdrop_type bdrop);
void remote_backdrop_show(enum backdrop_type bdrop);
void remote_backdrop_hide(void);
#else
static inline
bool remote_backdrop_load(enum backdrop_type bdrop,const char* filename)
{
(void)filename; (void)bdrop; return true;
}
static inline void remote_backdrop_unload(enum backdrop_type bdrop)
{
(void)bdrop;
}
static inline void remote_backdrop_show(enum backdrop_type bdrop)
{
(void)bdrop;
}
static inline void remote_backdrop_hide(void) {}
#endif
#endif

View file

@ -202,7 +202,9 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
#endif
screen->set_viewport(parent);
#if LCD_DEPTH > 1
screen->backdrop_show(BACKDROP_MAIN);
#endif
screen->backlight_on();
screen->clear_viewport();

View file

@ -89,8 +89,9 @@ static void toggle_theme(enum screen_type screen, bool force)
add_event(PLAYBACK_EVENT_NEXTTRACKID3_AVAILABLE, false,
do_sbs_update_callback);
#if LCD_DEPTH > 1
screens[screen].backdrop_show(BACKDROP_MAIN);
#endif
/* remove the left overs from the previous screen.
* could cause a tiny flicker. Redo your screen code if that happens */
if (!was_enabled[screen] || force)
@ -145,7 +146,9 @@ static void toggle_theme(enum screen_type screen, bool force)
{
FOR_NB_SCREENS(i)
{
#if LCD_DEPTH > 1
screens[i].backdrop_hide();
#endif
screens[i].stop_scroll();
}

View file

@ -99,7 +99,9 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
{
bool loaded_ok;
#if LCD_DEPTH > 1
screens[screen].backdrop_unload(BACKDROP_SKIN_WPS);
#endif
#ifndef __PCTOOL__
/*
@ -561,7 +563,9 @@ static void gwps_leave_wps(void)
FOR_NB_SCREENS(i)
{
gui_wps[i].display->stop_scroll();
#if LCD_DEPTH > 1
gui_wps[i].display->backdrop_show(BACKDROP_MAIN);
#endif
#ifdef HAVE_LCD_BITMAP
bool draw = false;
@ -610,8 +614,8 @@ static void gwps_enter_wps(void)
vp->fg_pattern = display->get_foreground();
vp->bg_pattern = display->get_background();
}
#endif
display->backdrop_show(BACKDROP_SKIN_WPS);
#endif
/* make the backdrop actually take effect */
display->clear_display();
skin_update(gwps, WPS_REFRESH_ALL);
@ -1294,7 +1298,9 @@ void gui_sync_wps_init(void)
/* Currently no seperate wps_state needed/possible
so use the only available ( "global" ) one */
gui_wps[i].state = &wps_state;
#if LCD_DEPTH > 1
gui_wps[i].display->backdrop_unload(BACKDROP_SKIN_WPS);
#endif
/* must point to the same struct for both screens */
gui_wps[i].sync_data = &wps_sync_data;
}

View file

@ -199,10 +199,12 @@ struct screen screens[NB_SCREENS] =
.backlight_off=&backlight_off,
.is_backlight_on=&is_backlight_on,
.backlight_set_timeout=&backlight_set_timeout,
#if LCD_DEPTH > 1
.backdrop_load=&backdrop_load,
.backdrop_unload=&backdrop_unload,
.backdrop_show=&backdrop_show,
.backdrop_hide=&backdrop_hide,
#endif
#ifdef HAVE_BUTTONBAR
.has_buttonbar=false,
#endif
@ -286,10 +288,12 @@ struct screen screens[NB_SCREENS] =
.backlight_off=&remote_backlight_off,
.is_backlight_on=&is_remote_backlight_on,
.backlight_set_timeout=&remote_backlight_set_timeout,
#if LCD_DEPTH > 1
.backdrop_load=&remote_backdrop_load,
.backdrop_unload=&remote_backdrop_unload,
.backdrop_show=&remote_backdrop_show,
.backdrop_hide=&remote_backdrop_hide,
#endif
#ifdef HAVE_BUTTONBAR
.has_buttonbar=false,
#endif

View file

@ -147,10 +147,12 @@ struct screen
void (*backlight_off)(void);
bool (*is_backlight_on)(bool ignore_always_off);
void (*backlight_set_timeout)(int index);
#if LCD_DEPTH > 1
bool (*backdrop_load)(enum backdrop_type bdrop, const char* filename);
void (*backdrop_unload)(enum backdrop_type bdrop);
void (*backdrop_show)(enum backdrop_type bdrop);
void (*backdrop_hide)(void);
#endif
};
#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD)

View file

@ -796,8 +796,9 @@ void settings_apply(bool read_disk)
#if CONFIG_CODEC == SWCODEC
int i;
#endif
#if LCD_DEPTH > 1
int screen;
#endif
sound_settings_apply();
#ifdef HAVE_DISK_STORAGE
@ -918,8 +919,10 @@ void settings_apply(bool read_disk)
}
#endif
#if LCD_DEPTH > 1
FOR_NB_SCREENS(screen)
screens[screen].backdrop_show(BACKDROP_MAIN);
#endif
if ( global_settings.lang_file[0]) {
snprintf(buf, sizeof buf, LANG_DIR "/%s.lng",