]> git.sesse.net Git - vlc/blobdiff - src/interface/interface.c
s/informations/information/
[vlc] / src / interface / interface.c
index 92683915256e0e32a7a679fe72d266f5d9c88687..43b45f28d17af44730c25f12abea815042f5072b 100644 (file)
 
 #include <assert.h>
 #include <vlc_common.h>
+#include <vlc_modules.h>
+#include <vlc_interface.h>
 
-#include <vlc_aout.h>
-#include <vlc_vout.h>
-
-#include "vlc_interface.h"
 #if defined( __APPLE__ ) || defined( WIN32 )
 #include "../control/libvlc_internal.h"
 #endif
@@ -53,7 +51,7 @@
  * Local prototypes
  *****************************************************************************/
 static void* RunInterface( vlc_object_t *p_this );
-#if defined( __APPLE__ ) || defined( WIN32 )
+#if defined( __APPLE__ )
 static void * MonitorLibVLCDeath( vlc_object_t *p_this );
 #endif
 static int AddIntfCallback( vlc_object_t *, char const *,
@@ -108,7 +106,7 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
 
     /* Attach interface to LibVLC */
     vlc_object_attach( p_intf, p_libvlc );
-#if defined( __APPLE__ ) || defined( WIN32 )
+#if defined( __APPLE__ )
     p_intf->b_should_run_on_first_thread = false;
 #endif
 
@@ -128,7 +126,8 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
         goto error;
     }
 
-#if defined( __APPLE__ ) || defined( WIN32 )
+    vlc_mutex_lock( &lock );
+#if defined( __APPLE__ )
     /* Hack to get Mac OS X Cocoa runtime running
      * (it needs access to the main thread) */
     if( p_intf->b_should_run_on_first_thread )
@@ -224,7 +223,7 @@ static void* RunInterface( vlc_object_t *p_this )
     return NULL;
 }
 
-#if defined( __APPLE__ ) || defined( WIN32 )
+#if defined( __APPLE__ )
 #include "control/libvlc_internal.h" /* libvlc_InternalWait */
 /**
  * MonitorLibVLCDeath: Used when b_should_run_on_first_thread is set.