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

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


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

Qt4: correctly show the default Windows Audio Device

Close #9104

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

 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 b3a0610..254b23f 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