[vlc-commits] qt: hide mmdevice passthrough option on other OSes

Thomas Guillem git at videolan.org
Fri Dec 15 17:44:22 CET 2017


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 15 17:28:40 2017 +0100| [c17fa7816fab5adcda2ab731b09d320b1f66688b] | committer: Thomas Guillem

qt: hide mmdevice passthrough option on other OSes

(cherry picked from commit f998427259e560ba7d3a7e278ef3b69fdaab139f)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/gui/qt/components/simple_preferences.cpp | 16 +++++++++++-----
 modules/gui/qt/ui/sprefs_audio.ui                |  3 ---
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index 3ce17bed40..026ee36479 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -467,6 +467,17 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             }
 #endif
 
+#ifdef _WIN32
+            CONFIG_GENERIC( "mmdevice-passthrough", IntegerList,
+                            ui.mmdevicePassthroughLabel, mmdevicePassthroughBox );
+            optionWidgets["mmdevicePassthroughL"] = ui.mmdevicePassthroughLabel;
+            optionWidgets["mmdevicePassthroughB"] = ui.mmdevicePassthroughBox;
+#else
+            ui.mmdevicePassthroughLabel->setVisible( false );
+            ui.mmdevicePassthroughBox->setVisible( false );
+#endif
+
+
 #undef audioControl2
 #undef audioControl
 #undef audioCommon
@@ -487,9 +498,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             CONFIG_GENERIC( "audio-language" , String , ui.langLabel,
                             preferredAudioLanguage );
 
-            CONFIG_GENERIC( "mmdevice-passthrough", IntegerList,
-                            ui.mmdevicePassthroughLabel, mmdevicePassthroughBox );
-
             CONFIG_BOOL( "spdif", spdifBox );
             CONFIG_GENERIC( "force-dolby-surround", IntegerList, ui.dolbyLabel,
                             detectionDolby );
@@ -519,8 +527,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             ui.volumeValue->setButtonSymbols(QAbstractSpinBox::NoButtons);
             optionWidgets["volLW"] = ui.volumeValue;
             optionWidgets["headphoneB"] = ui.headphoneEffect;
-            optionWidgets["mmdevicePassthroughL"] = ui.mmdevicePassthroughLabel;
-            optionWidgets["mmdevicePassthroughB"] = ui.mmdevicePassthroughBox;
             optionWidgets["spdifChB"] = ui.spdifBox;
             optionWidgets["defaultVolume"] = ui.defaultVolume;
             optionWidgets["resetVolumeCheckbox"] = ui.resetVolumeCheckbox;
diff --git a/modules/gui/qt/ui/sprefs_audio.ui b/modules/gui/qt/ui/sprefs_audio.ui
index 1f90e08f65..4bd15613ba 100644
--- a/modules/gui/qt/ui/sprefs_audio.ui
+++ b/modules/gui/qt/ui/sprefs_audio.ui
@@ -270,9 +270,6 @@
          </item>
          <item row="4" column="1">
           <widget class="QComboBox" name="mmdevicePassthroughBox">
-           <property name="enabled">
-            <bool>true</bool>
-           </property>
            <property name="sizePolicy">
             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
              <horstretch>0</horstretch>



More information about the vlc-commits mailing list