summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 0d25e2aa96..e4a5c42d0d 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -58,6 +58,8 @@
58#include "yesno.h" 58#include "yesno.h"
59#include "viewport.h" 59#include "viewport.h"
60 60
61#include "debug.h"
62
61#if CONFIG_TUNER 63#if CONFIG_TUNER
62#include "radio.h" 64#include "radio.h"
63#endif 65#endif
@@ -632,9 +634,16 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
632#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(PLATFORM_HAS_VOLUME_CHANGE) 634#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(PLATFORM_HAS_VOLUME_CHANGE)
633 case SYS_VOLUME_CHANGED: 635 case SYS_VOLUME_CHANGED:
634 { 636 {
637 static bool firstvolume = true;
635 int volume = hosted_get_volume(); 638 int volume = hosted_get_volume();
636 if (global_settings.volume != volume) 639 DEBUGF("SYS_VOLUME_CHANGED: %d\n", volume);
640 if (global_settings.volume != volume) {
637 global_settings.volume = volume; 641 global_settings.volume = volume;
642 if (firstvolume) {
643 setvol();
644 firstvolume = false;
645 }
646 }
638 return 0; 647 return 0;
639 } 648 }
640#endif 649#endif