summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-01-27 06:47:56 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-01-27 06:47:56 +0000
commit2565389402662a5f29c0c00eb1db3d80b1f37478 (patch)
tree730e8276753414fc1984a3edbdad7529e058f558
parent27b8b73b86ecf648a15e9793cd8893ca49734cfb (diff)
downloadrockbox-2565389402662a5f29c0c00eb1db3d80b1f37478.tar.gz
rockbox-2565389402662a5f29c0c00eb1db3d80b1f37478.tar.bz2
rockbox-2565389402662a5f29c0c00eb1db3d80b1f37478.zip
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
-rw-r--r--apps/bookmark.c4
-rw-r--r--apps/gui/backdrop.h34
-rw-r--r--apps/gui/usb_screen.c2
-rw-r--r--apps/gui/viewport.c5
-rw-r--r--apps/gui/wps.c8
-rw-r--r--apps/screen_access.c4
-rw-r--r--apps/screen_access.h2
-rw-r--r--apps/settings.c5
8 files changed, 27 insertions, 37 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index d4bca415b4..78bbb77c86 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -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)
{
diff --git a/apps/gui/backdrop.h b/apps/gui/backdrop.h
index 4083464cee..f770797aa8 100644
--- a/apps/gui/backdrop.h
+++ b/apps/gui/backdrop.h
@@ -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
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index 86b77cb49e..ac31708718 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -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();
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index 3c5249cff9..ad9fad6846 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -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();
}
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index cb73e6f92c..3c0982270e 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -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;
}
diff --git a/apps/screen_access.c b/apps/screen_access.c
index 8267ce3ecd..775dc50d5f 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -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
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 396a0d0e88..31d4b0cf1b 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -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)
diff --git a/apps/settings.c b/apps/settings.c
index 9492448ade..8d1bcf7ae5 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -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",