changeset 36935:c666dcd51d10

Use the new internal event to set volume. This avoids manipulating the variable.
author ib
date Fri, 21 Mar 2014 14:51:39 +0000
parents 28401584d792
children 9afababf229e
files gui/ui/actions.c
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/actions.c	Fri Mar 21 14:49:13 2014 +0000
+++ b/gui/ui/actions.c	Fri Mar 21 14:51:39 2014 +0000
@@ -93,7 +93,7 @@
 
 void uiEvent(int ev, float param)
 {
-    int iparam     = (int)param, osd;
+    int iparam     = (int)param;
     mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
     float aspect;
     char cmd[40];
@@ -346,10 +346,7 @@
     case evSetBalance:
         guiInfo.Balance = param;
         mixer_setbalance(mixer, (guiInfo.Balance - 50.0) / 50.0);     // transform 0..100 to -1..1
-        osd       = osd_level;
-        osd_level = 0;
-        uiEvent(evSetVolume, guiInfo.Volume);
-        osd_level = osd;
+        uiEvent(ivSetVolume, guiInfo.Volume);
 
         if (osd_level) {
             osd_visible = (GetTimerMS() + 1000) | 1;