]> git.sesse.net Git - vlc/commitdiff
Qt4: correctly show the default Windows Audio Device
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 15 Aug 2013 18:36:28 +0000 (20:36 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 15 Aug 2013 18:36:28 +0000 (20:36 +0200)
Close #9104

modules/gui/qt4/menus.cpp

index b3a061039d12ec2aaacb1ea099f85eb93b3926e7..254b23f1e590c7f604ffe55d5357243a8eb669d2 100644 (file)
@@ -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 );