From 4764ee04c9c6432ad3cada25a8e87be056815815 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 6 Aug 2009 00:14:40 +0000 Subject: Add backdrop functions to the multiscreen api and add a enum backdrop_type parameter for different backdrops (main, wps), symplifying calls and removing dozens of #ifdefs (stubs added for non-backdrop displays that can't do backdrops). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22176 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'apps/settings.c') diff --git a/apps/settings.c b/apps/settings.c index 423e6ed173..6a761ecdd9 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -730,6 +730,7 @@ void settings_apply(bool read_disk) #if CONFIG_CODEC == SWCODEC int i; #endif + int screen; sound_settings_apply(); @@ -838,12 +839,7 @@ void settings_apply(bool read_disk) else load_kbd(NULL); #endif -#if LCD_DEPTH > 1 - unload_wps_backdrop(); -#endif -#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 - unload_remote_wps_backdrop(); -#endif + if ( global_settings.wps_file[0] && global_settings.wps_file[0] != 0xff ) { snprintf(buf, sizeof buf, WPS_DIR "/%s.wps", @@ -861,16 +857,15 @@ void settings_apply(bool read_disk) global_settings.backdrop_file[0] != 0xff ) { snprintf(buf, sizeof buf, BACKDROP_DIR "/%s.bmp", global_settings.backdrop_file); - load_main_backdrop(buf); + backdrop_load(BACKDROP_MAIN, buf); } else { - unload_main_backdrop(); + backdrop_unload(BACKDROP_MAIN); } - show_main_backdrop(); -#endif -#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1 - show_remote_main_backdrop(); #endif + FOR_NB_SCREENS(screen) + screens[screen].backdrop_show(BACKDROP_MAIN); + #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) if ( global_settings.rwps_file[0]) { snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps", -- cgit v1.2.3