diff options
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r-- | apps/gui/wps.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 79f35c61eb..ed3bf5f6b3 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -90,12 +90,41 @@ static void track_changed_callback(void *param); | |||
90 | static void nextid3available_callback(void* param); | 90 | static void nextid3available_callback(void* param); |
91 | 91 | ||
92 | 92 | ||
93 | #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps" | ||
94 | #ifdef HAVE_REMOTE_LCD | ||
95 | #define RWPS_DEFAULTCFG WPS_DIR "/rockbox_default.rwps" | ||
96 | #define DEFAULT_WPS(screen) ((screen) == SCREEN_MAIN ? \ | ||
97 | WPS_DEFAULTCFG:RWPS_DEFAULTCFG) | ||
98 | #else | ||
99 | #define DEFAULT_WPS(screen) (WPS_DEFAULTCFG) | ||
100 | #endif | ||
101 | |||
93 | void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | 102 | void wps_data_load(enum screen_type screen, const char *buf, bool isfile) |
94 | { | 103 | { |
95 | bool loaded_ok; | 104 | bool loaded_ok; |
96 | 105 | ||
97 | screens[screen].backdrop_unload(BACKDROP_SKIN_WPS); | 106 | screens[screen].backdrop_unload(BACKDROP_SKIN_WPS); |
98 | 107 | ||
108 | #ifndef __PCTOOL__ | ||
109 | /* | ||
110 | * Hardcode loading WPS_DEFAULTCFG to cause a reset ideally this | ||
111 | * wants to be a virtual file. Feel free to modify dirbrowse() | ||
112 | * if you're feeling brave. | ||
113 | */ | ||
114 | |||
115 | if (! strcmp(buf, DEFAULT_WPS(screen)) ) | ||
116 | { | ||
117 | #ifdef HAVE_REMOTE_LCD | ||
118 | if (screen == SCREEN_REMOTE) | ||
119 | global_settings.rwps_file[0] = '\0'; | ||
120 | else | ||
121 | #endif | ||
122 | global_settings.wps_file[0] = '\0'; | ||
123 | buf = NULL; | ||
124 | } | ||
125 | |||
126 | #endif /* __PCTOOL__ */ | ||
127 | |||
99 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, | 128 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, |
100 | &screens[screen], buf, isfile); | 129 | &screens[screen], buf, isfile); |
101 | if (!loaded_ok) /* load the hardcoded default */ | 130 | if (!loaded_ok) /* load the hardcoded default */ |