changeset 36958:f11488e801a9

Add an internal event to set balance. It does what the external one does except for triggering the OSD display.
author ib
date Mon, 24 Mar 2014 10:26:33 +0000
parents 975c482d1afc
children 97a4746e7888
files gui/app/app.h gui/ui/actions.c gui/win32/skinload.h
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/app/app.h	Mon Mar 24 10:18:55 2014 +0000
+++ b/gui/app/app.h	Mon Mar 24 10:26:33 2014 +0000
@@ -82,6 +82,7 @@
     ivSetDVDSubtitle,
     ivPlayDVD,
     ivSetVolume,
+    ivSetBalance,
     ivShowPopUpMenu,
     ivHidePopUpMenu,
     ivRedraw
--- a/gui/ui/actions.c	Mon Mar 24 10:18:55 2014 +0000
+++ b/gui/ui/actions.c	Mon Mar 24 10:26:33 2014 +0000
@@ -344,10 +344,14 @@
         break;
 
     case evSetBalance:
+    case ivSetBalance:
         guiInfo.Balance = param;
         mixer_setbalance(mixer, (guiInfo.Balance - 50.0) / 50.0);     // transform 0..100 to -1..1
         uiEvent(ivSetVolume, guiInfo.Volume);
 
+        if (ev == ivSetBalance)
+            break;
+
         if (osd_level) {
             osd_visible = (GetTimerMS() + 1000) | 1;
             vo_osd_progbar_type  = OSD_BALANCE;
--- a/gui/win32/skinload.h	Mon Mar 24 10:18:55 2014 +0000
+++ b/gui/win32/skinload.h	Mon Mar 24 10:26:33 2014 +0000
@@ -193,6 +193,7 @@
   ivSetDVDSubtitle,
   ivPlayDVD,
   ivSetVolume,
+  ivSetBalance,
   ivShowPopUpMenu,
   ivHidePopUpMenu,
   ivRedraw