[vlc-commits] qt: enable volume-save on windows for "any"

Thomas Guillem git at videolan.org
Wed Feb 28 13:55:51 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 27 16:00:47 2018 +0100| [0d947a4c78bb3afb95147dbcc8fce0b2409f724d] | committer: Thomas Guillem

qt: enable volume-save on windows for "any"

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0d947a4c78bb3afb95147dbcc8fce0b2409f724d
---

 modules/gui/qt/components/simple_preferences.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index a811714e4e..635cc274c0 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -128,7 +128,15 @@ static struct {
 static int getDefaultAudioVolume(vlc_object_t *obj, const char *aout)
 {
     if (!strcmp(aout, "") || !strcmp(aout, "any"))
+#ifdef _WIN32
+        /* All Windows aouts, that can be selected automatically, handle volume
+         * saving. In case of automatic mode, we'll save the last volume for
+         * every modules. Therefore, all volumes variable we be the same and we
+         * can use the first one (mmdevice). */
+        return config_GetFloat(obj, "mmdevice-volume") * 100.f + .5f;
+#else
         return -1;
+#endif
     else
     /* Note: For hysterical raisins, this is sorted by decreasing priority
      * order (then alphabetical order). */



More information about the vlc-commits mailing list