diff options
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r-- | apps/gui/wps.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 0cfa92cd63..646f6b4003 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -159,14 +159,13 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
159 | #endif | 159 | #endif |
160 | } | 160 | } |
161 | 161 | ||
162 | static bool wps_fading_out = false; | ||
163 | void fade(bool fade_in, bool updatewps) | 162 | void fade(bool fade_in, bool updatewps) |
164 | { | 163 | { |
165 | int fp_global_vol = global_settings.volume << 8; | 164 | int fp_global_vol = global_settings.volume << 8; |
166 | int fp_min_vol = sound_min(SOUND_VOLUME) << 8; | 165 | int fp_min_vol = sound_min(SOUND_VOLUME) << 8; |
167 | int fp_step = (fp_global_vol - fp_min_vol) / 30; | 166 | int fp_step = (fp_global_vol - fp_min_vol) / 30; |
168 | int i; | 167 | int i; |
169 | wps_fading_out = !fade_in; | 168 | wps_state.is_fading = !fade_in; |
170 | if (fade_in) { | 169 | if (fade_in) { |
171 | /* fade in */ | 170 | /* fade in */ |
172 | int fp_volume = fp_min_vol; | 171 | int fp_volume = fp_min_vol; |
@@ -204,7 +203,7 @@ void fade(bool fade_in, bool updatewps) | |||
204 | sleep(1); | 203 | sleep(1); |
205 | } | 204 | } |
206 | audio_pause(); | 205 | audio_pause(); |
207 | wps_fading_out = false; | 206 | wps_state.is_fading = false; |
208 | #if CONFIG_CODEC != SWCODEC | 207 | #if CONFIG_CODEC != SWCODEC |
209 | #ifndef SIMULATOR | 208 | #ifndef SIMULATOR |
210 | /* let audio thread run and wait for the mas to run out of data */ | 209 | /* let audio thread run and wait for the mas to run out of data */ |
@@ -217,10 +216,6 @@ void fade(bool fade_in, bool updatewps) | |||
217 | sound_set_volume(global_settings.volume); | 216 | sound_set_volume(global_settings.volume); |
218 | } | 217 | } |
219 | } | 218 | } |
220 | bool is_wps_fading(void) | ||
221 | { | ||
222 | return wps_fading_out; | ||
223 | } | ||
224 | 219 | ||
225 | static bool update_onvol_change(struct gui_wps * gwps) | 220 | static bool update_onvol_change(struct gui_wps * gwps) |
226 | { | 221 | { |
@@ -1305,6 +1300,11 @@ void gui_sync_wps_init(void) | |||
1305 | 1300 | ||
1306 | 1301 | ||
1307 | #ifdef IPOD_ACCESSORY_PROTOCOL | 1302 | #ifdef IPOD_ACCESSORY_PROTOCOL |
1303 | bool is_wps_fading(void) | ||
1304 | { | ||
1305 | return wps_state.is_fading; | ||
1306 | } | ||
1307 | |||
1308 | int wps_get_ff_rewind_count(void) | 1308 | int wps_get_ff_rewind_count(void) |
1309 | { | 1309 | { |
1310 | return wps_state.ff_rewind_count; | 1310 | return wps_state.ff_rewind_count; |