changeset 36933:fec1a036882c

Add an internal event to set volume. It does what the external one does except for triggering the OSD display.
author ib
date Fri, 21 Mar 2014 14:42:48 +0000
parents d762d49a47e0
children 28401584d792
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	Fri Mar 21 14:33:50 2014 +0000
+++ b/gui/app/app.h	Fri Mar 21 14:42:48 2014 +0000
@@ -81,6 +81,7 @@
     ivSetDVDAudio,
     ivSetDVDSubtitle,
     ivPlayDVD,
+    ivSetVolume,
     ivShowPopUpMenu,
     ivHidePopUpMenu,
     ivRedraw
--- a/gui/ui/actions.c	Fri Mar 21 14:33:50 2014 +0000
+++ b/gui/ui/actions.c	Fri Mar 21 14:42:48 2014 +0000
@@ -323,6 +323,7 @@
         break;
 
     case evSetVolume:
+    case ivSetVolume:
         guiInfo.Volume = param;
         {
             float l = guiInfo.Volume * (100.0 - guiInfo.Balance) / 50.0;
@@ -330,6 +331,9 @@
             mixer_setvolume(mixer, FFMIN(l, guiInfo.Volume), FFMIN(r, guiInfo.Volume));
         }
 
+        if (ev == evSetVolume)
+            break;
+
         if (osd_level) {
             osd_visible = (GetTimerMS() + 1000) | 1;
             vo_osd_progbar_type  = OSD_VOLUME;
--- a/gui/win32/skinload.h	Fri Mar 21 14:33:50 2014 +0000
+++ b/gui/win32/skinload.h	Fri Mar 21 14:42:48 2014 +0000
@@ -192,6 +192,7 @@
   ivSetDVDAudio,
   ivSetDVDSubtitle,
   ivPlayDVD,
+  ivSetVolume,
   ivShowPopUpMenu,
   ivHidePopUpMenu,
   ivRedraw