summaryrefslogtreecommitdiff
path: root/apps/gui/wps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r--apps/gui/wps.c38
1 files changed, 8 insertions, 30 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index bce4db2b8a..bbf169ff96 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -92,7 +92,8 @@ static void nextid3available_callback(void* param);
92 92
93void wps_data_load(enum screen_type screen, const char *buf, bool isfile) 93void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
94{ 94{
95 bool loaded_ok = buf && skin_data_load(gui_wps[screen].data, &screens[screen], buf, isfile); 95 bool loaded_ok = buf && skin_data_load(gui_wps[screen].data,
96 &screens[screen], buf, isfile);
96 if (!loaded_ok) /* load the hardcoded default */ 97 if (!loaded_ok) /* load the hardcoded default */
97 { 98 {
98 char *skin_buf[NB_SCREENS] = { 99 char *skin_buf[NB_SCREENS] = {
@@ -115,24 +116,9 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
115 "%pb\n", 116 "%pb\n",
116#endif 117#endif
117 }; 118 };
119 screens[screen].backdrop_unload(BACKDROP_SKIN_WPS);
118 skin_data_load(gui_wps[screen].data, &screens[screen], 120 skin_data_load(gui_wps[screen].data, &screens[screen],
119 skin_buf[screen], false); 121 skin_buf[screen], false);
120 /* set the default wps for the main-screen */
121 if(screen == SCREEN_MAIN)
122 {
123#if LCD_DEPTH > 1
124 unload_wps_backdrop();
125#endif
126 }
127#ifdef HAVE_REMOTE_LCD
128 /* set the default wps for the remote-screen */
129 else if(screen == SCREEN_REMOTE)
130 {
131#if LCD_REMOTE_DEPTH > 1
132 unload_remote_wps_backdrop();
133#endif
134 }
135#endif
136 } 122 }
137#ifdef HAVE_REMOVE_LCD 123#ifdef HAVE_REMOVE_LCD
138 gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN); 124 gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN);
@@ -564,16 +550,13 @@ static void gwps_leave_wps(void)
564 int i, oldbars = VP_SB_HIDE_ALL; 550 int i, oldbars = VP_SB_HIDE_ALL;
565 551
566 FOR_NB_SCREENS(i) 552 FOR_NB_SCREENS(i)
553 {
567 gui_wps[i].display->stop_scroll(); 554 gui_wps[i].display->stop_scroll();
555 gui_wps[i].display->backdrop_show(BACKDROP_MAIN);
556 }
568 if (global_settings.statusbar) 557 if (global_settings.statusbar)
569 oldbars = VP_SB_ALLSCREENS; 558 oldbars = VP_SB_ALLSCREENS;
570 559
571#if LCD_DEPTH > 1
572 show_main_backdrop();
573#endif
574#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
575 show_remote_main_backdrop();
576#endif
577 viewportmanager_set_statusbar(oldbars); 560 viewportmanager_set_statusbar(oldbars);
578#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 561#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
579 /* Play safe and unregister the hook */ 562 /* Play safe and unregister the hook */
@@ -1237,23 +1220,18 @@ void gui_sync_wps_init(void)
1237 wps_datas[i].wps_uses_albumart = 0; 1220 wps_datas[i].wps_uses_albumart = 0;
1238#endif 1221#endif
1239#ifdef HAVE_REMOTE_LCD 1222#ifdef HAVE_REMOTE_LCD
1240 wps_datas[i].remote_wps = (i != 0); 1223 wps_datas[i].remote_wps = (i == SCREEN_REMOTE);
1241#endif 1224#endif
1242 gui_wps[i].data = &wps_datas[i]; 1225 gui_wps[i].data = &wps_datas[i];
1243 gui_wps[i].display = &screens[i]; 1226 gui_wps[i].display = &screens[i];
1244 /* Currently no seperate wps_state needed/possible 1227 /* Currently no seperate wps_state needed/possible
1245 so use the only available ( "global" ) one */ 1228 so use the only available ( "global" ) one */
1246 gui_wps[i].state = &wps_state; 1229 gui_wps[i].state = &wps_state;
1230 gui_wps[i].display->backdrop_unload(BACKDROP_SKIN_WPS);
1247 } 1231 }
1248#ifdef HAVE_LCD_BITMAP 1232#ifdef HAVE_LCD_BITMAP
1249 add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, statusbar_toggle_handler); 1233 add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, statusbar_toggle_handler);
1250#endif 1234#endif
1251#if LCD_DEPTH > 1
1252 unload_wps_backdrop();
1253#endif
1254#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
1255 unload_remote_wps_backdrop();
1256#endif
1257} 1235}
1258 1236
1259#ifdef HAVE_ALBUMART 1237#ifdef HAVE_ALBUMART