# HG changeset patch # User ib # Date 1395413499 0 # Node ID c666dcd51d10079c577d16d8ebe19bd2aee519d0 # Parent 28401584d792e2df9515d1226c1c03be652a476b Use the new internal event to set volume. This avoids manipulating the variable. diff -r 28401584d792 -r c666dcd51d10 gui/ui/actions.c --- 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;