]> git.sesse.net Git - vlc/commitdiff
Qt: restore audio volume save
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 24 Aug 2011 16:16:42 +0000 (18:16 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 24 Aug 2011 16:16:42 +0000 (18:16 +0200)
Close #4922 #3983

I am not sure this is the right way to do yet, but this will act as a
work-around, until we have a proper fix

modules/gui/qt4/input_manager.cpp

index cb467509ecc1983834ed3298845b5a9ef60a8929..1b4bb1b48e1a21804bef465752108635b96e6585 100644 (file)
@@ -35,6 +35,7 @@
 #include <vlc_url.h>
 #include <vlc_strings.h>
 #include <vlc_aout.h>
+#include <vlc_aout_intf.h>
 
 #include <QApplication>
 
@@ -989,6 +990,9 @@ MainInputManager::~MainInputManager()
     config_PutInt( p_intf, "random", var_GetBool( THEPL, "random" ) );
     config_PutInt( p_intf, "loop", var_GetBool( THEPL, "loop" ) );
     config_PutInt( p_intf, "repeat", var_GetBool( THEPL, "repeat" ) );
+
+    if( var_InheritBool( p_intf, "qt-autosave-volume" ) )
+        config_PutInt( p_intf, "volume", aout_VolumeGet( THEPL ) );
 }
 
 vout_thread_t* MainInputManager::getVout()