]> git.sesse.net Git - vlc/commitdiff
skins2(windows): correct playback not started automatically (trac #2539)
authorErwan Tulou <erwan10@videolan.org>
Sat, 27 Jun 2009 22:46:22 +0000 (00:46 +0200)
committerErwan Tulou <erwan10@videolan.org>
Sun, 28 Jun 2009 19:40:10 +0000 (21:40 +0200)
Since skins2(Windows) is run in the main thread, the default mechanism couldn't work.

modules/gui/skins2/src/skin_main.cpp

index 8f6cf5dcf95a26efce5f3c3a9083b07f384bb08f..e792a42f7327f7f89d0558003d0a172342ccf59e 100644 (file)
@@ -49,6 +49,7 @@
 #include "../commands/cmd_quit.hpp"
 #include "../commands/cmd_dialogs.hpp"
 #include "../commands/cmd_minimize.hpp"
+#include "../commands/cmd_playlist.hpp"
 
 //---------------------------------------------------------------------------
 // Exported interface functions.
@@ -233,7 +234,14 @@ static int Open( vlc_object_t *p_this )
     free( skin_last );
 
 #ifdef WIN32
+
     p_intf->b_should_run_on_first_thread = true;
+
+    // enqueue a command to automatically start the first playlist item
+    AsyncQueue *pQueue = AsyncQueue::instance( p_intf );
+    CmdPlaylistFirst *pCmd = new CmdPlaylistFirst( p_intf );
+    pQueue->push( CmdGenericPtr( pCmd ) );
+
 #endif
 
     return( VLC_SUCCESS );