diff options
author | Björn Stenberg <bjorn@haxx.se> | 2011-03-31 07:04:44 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2011-03-31 07:04:44 +0000 |
commit | ce755dd9c59dd16783bc9e94a4475a283c3e6996 (patch) | |
tree | e4637804ad7ecd1cfbe68e903c6128f45da6b494 /apps | |
parent | 277b8fba7149f0825e61d3112acbaac1b3a04bce (diff) | |
download | rockbox-ce755dd9c59dd16783bc9e94a4475a283c3e6996.tar.gz rockbox-ce755dd9c59dd16783bc9e94a4475a283c3e6996.zip |
Only set volume on SYS_VOLUME_CHANGED the first time. Workaround for FS#12034.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29663 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/misc.c | 11 |
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 |