summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-06 00:14:40 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-06 00:14:40 +0000
commit4764ee04c9c6432ad3cada25a8e87be056815815 (patch)
tree490154e71180349bb1991bd04445ddc0287a5db3 /apps/settings.c
parent4632fc0682cfc3e2490435d616c7fa0b48088125 (diff)
downloadrockbox-4764ee04c9c6432ad3cada25a8e87be056815815.tar.gz
rockbox-4764ee04c9c6432ad3cada25a8e87be056815815.zip
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
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c19
1 files changed, 7 insertions, 12 deletions
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)
730#if CONFIG_CODEC == SWCODEC 730#if CONFIG_CODEC == SWCODEC
731 int i; 731 int i;
732#endif 732#endif
733 int screen;
733 734
734 sound_settings_apply(); 735 sound_settings_apply();
735 736
@@ -838,12 +839,7 @@ void settings_apply(bool read_disk)
838 else 839 else
839 load_kbd(NULL); 840 load_kbd(NULL);
840#endif 841#endif
841#if LCD_DEPTH > 1 842
842 unload_wps_backdrop();
843#endif
844#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
845 unload_remote_wps_backdrop();
846#endif
847 if ( global_settings.wps_file[0] && 843 if ( global_settings.wps_file[0] &&
848 global_settings.wps_file[0] != 0xff ) { 844 global_settings.wps_file[0] != 0xff ) {
849 snprintf(buf, sizeof buf, WPS_DIR "/%s.wps", 845 snprintf(buf, sizeof buf, WPS_DIR "/%s.wps",
@@ -861,16 +857,15 @@ void settings_apply(bool read_disk)
861 global_settings.backdrop_file[0] != 0xff ) { 857 global_settings.backdrop_file[0] != 0xff ) {
862 snprintf(buf, sizeof buf, BACKDROP_DIR "/%s.bmp", 858 snprintf(buf, sizeof buf, BACKDROP_DIR "/%s.bmp",
863 global_settings.backdrop_file); 859 global_settings.backdrop_file);
864 load_main_backdrop(buf); 860 backdrop_load(BACKDROP_MAIN, buf);
865 } else { 861 } else {
866 unload_main_backdrop(); 862 backdrop_unload(BACKDROP_MAIN);
867 } 863 }
868 show_main_backdrop();
869#endif
870#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
871 show_remote_main_backdrop();
872#endif 864#endif
873 865
866 FOR_NB_SCREENS(screen)
867 screens[screen].backdrop_show(BACKDROP_MAIN);
868
874#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) 869#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
875 if ( global_settings.rwps_file[0]) { 870 if ( global_settings.rwps_file[0]) {
876 snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps", 871 snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps",