[vlc-commits] Qt4: correctly show the default Windows Audio Device

Jean-Baptiste Kempf git at videolan.org
Thu Aug 15 20:42:39 CEST 2013


vlc/vlc-2.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 15 20:36:28 2013 +0200| [acfe9ccd374a4ab791e9322bfe416323a63c23c4] | committer: Jean-Baptiste Kempf

Qt4: correctly show the default Windows Audio Device

Close #9104

(cherry picked from commit 9dccad2ac30bd5c0af0991d80601f5232c29d327)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/menus.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 70a20f6..17fd12a 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1565,7 +1565,8 @@ void VLCMenuBar::updateAudioDevice( intf_thread_t * p_intf, audio_output_t *p_ao
         action = new QAction( qfue( names[i] ), NULL );
         action->setData( ids[i] );
         action->setCheckable( true );
-        if( selected && !strcmp( ids[i], selected ) )
+        if( (selected && !strcmp( ids[i], selected ) ) ||
+            (selected == NULL && ids[i] && ids[i][0] == '\0' ) )
             action->setChecked( true );
         actionGroup->addAction( action );
         current->addAction( action );



More information about the vlc-commits mailing list