summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/gwps-common.c12
-rw-r--r--apps/gui/gwps-common.h2
-rw-r--r--apps/gui/gwps.c6
3 files changed, 11 insertions, 9 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index b90c216f58..f5ef604498 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -83,7 +83,7 @@ static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force)
83 83
84/* fades the volume */ 84/* fades the volume */
85bool wps_fading_out = false; 85bool wps_fading_out = false;
86void fade(bool fade_in) 86void fade(bool fade_in, bool updatewps)
87{ 87{
88 int fp_global_vol = global_settings.volume << 8; 88 int fp_global_vol = global_settings.volume << 8;
89 int fp_min_vol = sound_min(SOUND_VOLUME) << 8; 89 int fp_min_vol = sound_min(SOUND_VOLUME) << 8;
@@ -103,8 +103,9 @@ void fade(bool fade_in)
103 while (fp_volume < fp_global_vol - fp_step) { 103 while (fp_volume < fp_global_vol - fp_step) {
104 fp_volume += fp_step; 104 fp_volume += fp_step;
105 sound_set_volume(fp_volume >> 8); 105 sound_set_volume(fp_volume >> 8);
106 FOR_NB_SCREENS(i) 106 if (updatewps)
107 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC); 107 FOR_NB_SCREENS(i)
108 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
108 sleep(1); 109 sleep(1);
109 } 110 }
110 sound_set_volume(global_settings.volume); 111 sound_set_volume(global_settings.volume);
@@ -116,8 +117,9 @@ void fade(bool fade_in)
116 while (fp_volume > fp_min_vol + fp_step) { 117 while (fp_volume > fp_min_vol + fp_step) {
117 fp_volume -= fp_step; 118 fp_volume -= fp_step;
118 sound_set_volume(fp_volume >> 8); 119 sound_set_volume(fp_volume >> 8);
119 FOR_NB_SCREENS(i) 120 if (updatewps)
120 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC); 121 FOR_NB_SCREENS(i)
122 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
121 sleep(1); 123 sleep(1);
122 } 124 }
123 audio_pause(); 125 audio_pause();
diff --git a/apps/gui/gwps-common.h b/apps/gui/gwps-common.h
index 3119755502..ccdc31b5a9 100644
--- a/apps/gui/gwps-common.h
+++ b/apps/gui/gwps-common.h
@@ -23,7 +23,7 @@
23 23
24#include "gwps.h" 24#include "gwps.h"
25 25
26void fade(bool fade_in); 26void fade(bool fade_in, bool updatewps);
27bool gui_wps_display(void); 27bool gui_wps_display(void);
28bool update_onvol_change(struct gui_wps * gwps); 28bool update_onvol_change(struct gui_wps * gwps);
29bool update(struct gui_wps *gwps); 29bool update(struct gui_wps *gwps);
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 26d31c65bd..5426c937c0 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -326,7 +326,7 @@ long gui_wps_show(void)
326 { 326 {
327 wps_state.paused = false; 327 wps_state.paused = false;
328 if ( global_settings.fade_on_stop ) 328 if ( global_settings.fade_on_stop )
329 fade(1); 329 fade(true, true);
330 else 330 else
331 audio_resume(); 331 audio_resume();
332 } 332 }
@@ -334,7 +334,7 @@ long gui_wps_show(void)
334 { 334 {
335 wps_state.paused = true; 335 wps_state.paused = true;
336 if ( global_settings.fade_on_stop ) 336 if ( global_settings.fade_on_stop )
337 fade(0); 337 fade(false, true);
338 else 338 else
339 audio_pause(); 339 audio_pause();
340 settings_save(); 340 settings_save();
@@ -712,7 +712,7 @@ long gui_wps_show(void)
712 status_set_audio(false); 712 status_set_audio(false);
713#endif 713#endif
714 if (global_settings.fade_on_stop) 714 if (global_settings.fade_on_stop)
715 fade(0); 715 fade(false, true);
716 716
717 FOR_NB_SCREENS(i) 717 FOR_NB_SCREENS(i)
718 gui_wps[i].display->stop_scroll(); 718 gui_wps[i].display->stop_scroll();