]> git.sesse.net Git - vlc/blobdiff - modules/gui/minimal_macosx/intf.m
macosx: run on first thread directly, like already done by Qt4
[vlc] / modules / gui / minimal_macosx / intf.m
index 9ad3d08796d32e16932e8134276debd9bd4621c4..e31ebb91b263200f232ea1c81f36d09d64abc837 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <vlc_input.h>
 #import <vlc_interface.h>
+#include "../../../lib/libvlc_internal.h"
 
 #import <intf.h>
 
@@ -58,13 +59,13 @@ int OpenIntf ( vlc_object_t *p_this )
     p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
     if( p_intf->p_sys == NULL )
     {
-        return( 1 );
+        return VLC_ENOMEM;
     }
 
     memset( p_intf->p_sys, 0, sizeof( *p_intf->p_sys ) );
 
-    p_intf->pf_run = Run;
-    p_intf->b_should_run_on_first_thread = true;
+    libvlc_SetExitHandler( p_intf->p_libvlc, vlc_object_kill, p_intf );
+    Run( p_intf );
 
     return VLC_SUCCESS;
 }
@@ -125,11 +126,6 @@ static void Run( intf_thread_t *p_intf )
 {
     sigset_t set;
 
-    /* Do it again - for some unknown reason, vlc_thread_create() often
-     * fails to go to real-time priority with the first launched thread
-     * (???) --Meuuh */
-    vlc_thread_set_priority( p_intf, VLC_THREAD_PRIORITY_LOW );
-
     /* Make sure the "force quit" menu item does quit instantly.
      * VLC overrides SIGTERM which is sent by the "force quit"
      * menu item to make sure deamon mode quits gracefully, so