]> git.sesse.net Git - vlc/blobdiff - modules/gui/wince/wince.cpp
Implement Lua objects in the C code directly. Fix most type checks. Move every thing...
[vlc] / modules / gui / wince / wince.cpp
index 7a223138574069a09922a03219a063f80b2efc40..07306ec36d36a1437c46f324ed5ad52db54d1389 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_interface.h>
 
 #if defined( UNDER_CE ) && defined(__MINGW32__)
@@ -61,13 +66,12 @@ vlc_module_begin();
     set_capability( "interface", 100 );
     set_callbacks( Open, Close );
     add_shortcut( "wince" );
-    set_program( "wcevlc" );
 
     add_bool( "wince-embed", 1, NULL,
-              EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
+              EMBED_TEXT, EMBED_LONGTEXT, false );
 
     add_submodule();
-    set_description( _("WinCE dialogs provider") );
+    set_description( N_("WinCE dialogs provider") );
     set_capability( "dialogs provider", 10 );
     set_callbacks( OpenDialogs, Close );
 vlc_module_end();
@@ -112,7 +116,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     // Suscribe to messages bank
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     // Misc init
     p_intf->p_sys->p_audio_menu = NULL;
@@ -191,7 +195,7 @@ static void Run( intf_thread_t *p_intf )
 
         /* Create a new thread for the dialogs provider */
         if( vlc_thread_create( p_intf, "Skins Dialogs Thread",
-                               MainLoop, 0, VLC_TRUE ) )
+                               MainLoop, 0, true ) )
         {
             msg_Err( p_intf, "cannot create Skins Dialogs Thread" );
             p_intf->pf_show_dialog = NULL;
@@ -249,19 +253,6 @@ static void MainLoop( intf_thread_t *p_intf )
     /* OK, initialization is over */
     vlc_thread_ready( p_intf );
 
-    /* Check if we need to start playing */
-    if( !p_intf->pf_show_dialog && p_intf->b_play )
-    {
-        playlist_t *p_playlist =
-            (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                           FIND_ANYWHERE );
-        if( p_playlist )
-        {
-            playlist_Play( p_playlist );
-            vlc_object_release( p_playlist );
-        }
-    }
-
     // Main message loop
     while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
     {
@@ -270,7 +261,7 @@ static void MainLoop( intf_thread_t *p_intf )
     }
 
  end:
-    if( intf ) delete intf;
+    delete intf;
 
 #ifndef UNDER_CE
     /* Uninitialize OLE/COM */