No need to clutter the root object with stuff that can be static.
/* Arch-specific variables */
#if defined( SYS_BEOS )
/* Arch-specific variables */
#if defined( SYS_BEOS )
- vlc_object_t * p_appthread;
char * psz_vlcpath;
#elif defined( __APPLE__ )
char * psz_vlcpath;
char * psz_vlcpath;
#elif defined( __APPLE__ )
char * psz_vlcpath;
#include "../../modules/gui/beos/MsgVals.h"
#define REALLY_QUIT 'requ'
#include "../../modules/gui/beos/MsgVals.h"
#define REALLY_QUIT 'requ'
+static vlc_object_t *p_appthread;
+
*****************************************************************************/
void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
{
*****************************************************************************/
void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
{
- vlc_global()->p_appthread =
(vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) );
/* Create the BApplication thread and wait for initialization */
(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_create( p_appthread, "app thread", AppThread,
VLC_THREAD_PRIORITY_LOW, true );
}
VLC_THREAD_PRIORITY_LOW, true );
}
/* Tell the BApplication to die */
be_app->PostMessage( REALLY_QUIT );
/* Tell the BApplication to die */
be_app->PostMessage( REALLY_QUIT );
- vlc_thread_join( vlc_global()->p_appthread );
- vlc_object_release( vlc_global()->p_appthread );
+ vlc_thread_join( p_appthread );
+ vlc_object_release( p_appthread );
free( vlc_global()->psz_vlcpath );
}
free( vlc_global()->psz_vlcpath );
}