From ce755dd9c59dd16783bc9e94a4475a283c3e6996 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 31 Mar 2011 07:04:44 +0000 Subject: 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 --- apps/misc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps') 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 @@ #include "yesno.h" #include "viewport.h" +#include "debug.h" + #if CONFIG_TUNER #include "radio.h" #endif @@ -632,9 +634,16 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(PLATFORM_HAS_VOLUME_CHANGE) case SYS_VOLUME_CHANGED: { + static bool firstvolume = true; int volume = hosted_get_volume(); - if (global_settings.volume != volume) + DEBUGF("SYS_VOLUME_CHANGED: %d\n", volume); + if (global_settings.volume != volume) { global_settings.volume = volume; + if (firstvolume) { + setvol(); + firstvolume = false; + } + } return 0; } #endif -- cgit v1.2.3