diff options
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r-- | apps/gui/wps.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index a74e3d449d..11ce946e98 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include "action.h" | 31 | #include "action.h" |
32 | #include "kernel.h" | 32 | #include "kernel.h" |
33 | #include "filetypes.h" | 33 | #include "filetypes.h" |
34 | #include "debug.h" | ||
35 | #include "sprintf.h" | 34 | #include "sprintf.h" |
36 | #include "settings.h" | 35 | #include "settings.h" |
37 | #include "skin_engine/skin_engine.h" | 36 | #include "skin_engine/skin_engine.h" |
@@ -67,6 +66,7 @@ | |||
67 | #include "dsp.h" | 66 | #include "dsp.h" |
68 | #include "playlist_viewer.h" | 67 | #include "playlist_viewer.h" |
69 | #include "wps.h" | 68 | #include "wps.h" |
69 | #include "statusbar-skinned.h" | ||
70 | 70 | ||
71 | #define RESTORE_WPS_INSTANTLY 0l | 71 | #define RESTORE_WPS_INSTANTLY 0l |
72 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) | 72 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) |
@@ -82,7 +82,7 @@ | |||
82 | static int wpsbars = 0; | 82 | static int wpsbars = 0; |
83 | 83 | ||
84 | /* currently only one wps_state is needed, initialize to 0 */ | 84 | /* currently only one wps_state is needed, initialize to 0 */ |
85 | static struct wps_state wps_state = { .id3 = NULL }; | 85 | struct wps_state wps_state = { .id3 = NULL }; |
86 | static struct gui_wps gui_wps[NB_SCREENS] = {{ .data = NULL }}; | 86 | static struct gui_wps gui_wps[NB_SCREENS] = {{ .data = NULL }}; |
87 | static struct wps_data wps_datas[NB_SCREENS] = {{ .wps_loaded = 0 }}; | 87 | static struct wps_data wps_datas[NB_SCREENS] = {{ .wps_loaded = 0 }}; |
88 | 88 | ||
@@ -129,8 +129,8 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
129 | 129 | ||
130 | #endif /* __PCTOOL__ */ | 130 | #endif /* __PCTOOL__ */ |
131 | 131 | ||
132 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, | 132 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, buf, isfile); |
133 | &screens[screen], buf, isfile); | 133 | |
134 | if (!loaded_ok) /* load the hardcoded default */ | 134 | if (!loaded_ok) /* load the hardcoded default */ |
135 | { | 135 | { |
136 | char *skin_buf[NB_SCREENS] = { | 136 | char *skin_buf[NB_SCREENS] = { |
@@ -153,11 +153,11 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
153 | "%pb\n", | 153 | "%pb\n", |
154 | #endif | 154 | #endif |
155 | }; | 155 | }; |
156 | skin_data_load(gui_wps[screen].data, &screens[screen], | 156 | skin_data_load(gui_wps[screen].data, skin_buf[screen], false); |
157 | skin_buf[screen], false); | ||
158 | } | 157 | } |
159 | #ifdef HAVE_REMOVE_LCD | 158 | #ifdef HAVE_REMOVE_LCD |
160 | gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN); | 159 | gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN); |
160 | |||
161 | #endif | 161 | #endif |
162 | } | 162 | } |
163 | 163 | ||
@@ -587,6 +587,8 @@ static void gwps_leave_wps(void) | |||
587 | /* Play safe and unregister the hook */ | 587 | /* Play safe and unregister the hook */ |
588 | lcd_activation_set_hook(NULL); | 588 | lcd_activation_set_hook(NULL); |
589 | #endif | 589 | #endif |
590 | /* unhandle statusbar update delay */ | ||
591 | sb_skin_set_update_delay(DEFAULT_UPDATE_DELAY); | ||
590 | send_event(GUI_EVENT_REFRESH, NULL); | 592 | send_event(GUI_EVENT_REFRESH, NULL); |
591 | } | 593 | } |
592 | 594 | ||
@@ -739,7 +741,6 @@ long gui_wps_show(void) | |||
739 | #endif | 741 | #endif |
740 | } | 742 | } |
741 | } | 743 | } |
742 | |||
743 | #ifdef HAVE_LCD_BITMAP | 744 | #ifdef HAVE_LCD_BITMAP |
744 | /* when the peak meter is enabled we want to have a | 745 | /* when the peak meter is enabled we want to have a |
745 | few extra updates to make it look smooth. On the | 746 | few extra updates to make it look smooth. On the |
@@ -1175,7 +1176,13 @@ long gui_wps_show(void) | |||
1175 | skin_update(&gui_wps[i], WPS_REFRESH_NON_STATIC); | 1176 | skin_update(&gui_wps[i], WPS_REFRESH_NON_STATIC); |
1176 | } | 1177 | } |
1177 | } | 1178 | } |
1178 | wps_state.do_full_update = false; | 1179 | /* currently skinned statusbar and wps share the same wps_state, |
1180 | * don't steal do_full_update away */ | ||
1181 | if (wps_state.do_full_update) | ||
1182 | { | ||
1183 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); | ||
1184 | wps_state.do_full_update = false; | ||
1185 | } | ||
1179 | update = false; | 1186 | update = false; |
1180 | } | 1187 | } |
1181 | 1188 | ||
@@ -1188,6 +1195,9 @@ long gui_wps_show(void) | |||
1188 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 1195 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
1189 | lcd_activation_set_hook(wps_lcd_activation_hook); | 1196 | lcd_activation_set_hook(wps_lcd_activation_hook); |
1190 | #endif | 1197 | #endif |
1198 | /* we remove the update delay since it's not very usable in the wps, | ||
1199 | * e.g. during volume changing or ffwd/rewind */ | ||
1200 | sb_skin_set_update_delay(0); | ||
1191 | FOR_NB_SCREENS(i) | 1201 | FOR_NB_SCREENS(i) |
1192 | { | 1202 | { |
1193 | screens[i].stop_scroll(); | 1203 | screens[i].stop_scroll(); |