]> git.sesse.net Git - vlc/blobdiff - src/misc/beos_specific.cpp
Disable crashy FS controller by default
[vlc] / src / misc / beos_specific.cpp
index 779bcebab357a0c949ec2d8f3041774b3656cafd..321db791f4ce923b955b882094f03a70f21fef23 100644 (file)
@@ -37,7 +37,7 @@ extern "C"
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include "../libvlc.h"
 }
 
@@ -71,6 +71,8 @@ private:
 #include "../../modules/gui/beos/MsgVals.h"
 #define REALLY_QUIT 'requ'
 
+static vlc_object_t *p_appthread;
+
 extern "C"
 {
 
@@ -82,20 +84,20 @@ static void AppThread( vlc_object_t *p_appthread );
 /*****************************************************************************
  * system_Init: create a BApplication object and fill in program path.
  *****************************************************************************/
-void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
 {
-    vlc_global()->p_appthread =
+    p_appthread =
             (vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) );
 
     /* Create the BApplication thread and wait for initialization */
-    vlc_thread_create( vlc_global()->p_appthread, "app thread", AppThread,
-                       VLC_THREAD_PRIORITY_LOW, VLC_TRUE );
+    vlc_thread_create( p_appthread, "app thread", AppThread,
+                       VLC_THREAD_PRIORITY_LOW, true );
 }
 
 /*****************************************************************************
  * system_Configure: check for system specific configuration options.
  *****************************************************************************/
-void system_Configure( libvlc_int_t *, int *pi_argc, char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *, int *pi_argc, const char *ppsz_argv[] )
 {
 }
 
@@ -107,8 +109,8 @@ void system_End( libvlc_int_t *p_this )
     /* Tell the BApplication to die */
     be_app->PostMessage( REALLY_QUIT );
 
-    vlc_thread_join( vlc_global()->p_appthread );
-    vlc_object_destroy( vlc_global()->p_appthread );
+    vlc_thread_join( p_appthread );
+    vlc_object_release( p_appthread );
 
     free( vlc_global()->psz_vlcpath );
 }