X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fbeos_specific.cpp;h=51c70cf8a8182b9caeb871e1b55dab9c037c16f0;hb=53e51f041445f19a53b82bc702c7ac9b97863350;hp=91099ec15685f0fc076550c17d7dc30b39bd697d;hpb=2667b2aea8a913292b5b6d8a69d6987a900ae7af;p=vlc diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp index 91099ec156..51c70cf8a8 100644 --- a/src/misc/beos_specific.cpp +++ b/src/misc/beos_specific.cpp @@ -37,7 +37,7 @@ extern "C" # include "config.h" #endif -#include +#include #include "../libvlc.h" } @@ -79,7 +79,7 @@ extern "C" /***************************************************************************** * Local prototypes. *****************************************************************************/ -static void AppThread( vlc_object_t *p_appthread ); +static void* AppThread( vlc_object_t *p_appthread ); /***************************************************************************** * system_Init: create a BApplication object and fill in program path. @@ -112,7 +112,7 @@ void system_End( libvlc_int_t *p_this ) vlc_thread_join( p_appthread ); vlc_object_release( p_appthread ); - free( vlc_global()->psz_vlcpath ); + free( psz_vlcpath ); } /* following functions are local */ @@ -120,8 +120,9 @@ void system_End( libvlc_int_t *p_this ) /***************************************************************************** * AppThread: the BApplication thread. *****************************************************************************/ -static void AppThread( vlc_object_t * p_this ) +static void* AppThread( vlc_object_t * p_this ) { + int canc = vlc_savecancel (); VlcApplication * BeApp = new VlcApplication("application/x-vnd.videolan-vlc"); vlc_object_attach( p_this, p_this->p_libvlc ); @@ -129,6 +130,8 @@ static void AppThread( vlc_object_t * p_this ) BeApp->Run(); vlc_object_detach( p_this ); delete BeApp; + vlc_restorecancel (canc); + return NULL; } } /* extern "C" */ @@ -179,7 +182,7 @@ void VlcApplication::ReadyToRun( ) BEntry entry( &info.ref ); entry.GetPath( &path ); path.GetParent( &path ); - vlc_global()->psz_vlcpath = strdup( path.Path() ); + psz_vlcpath = strdup( path.Path() ); /* Tell the main thread we are finished initializing the BApplication */ vlc_thread_ready( p_this ); @@ -240,7 +243,7 @@ bool VlcApplication::QuitRequested() { if( !fReadyToQuit ) { - vlc_object_kill( p_this->p_libvlc ); + libvlc_Quit( p_this->p_libvlc ); return false; }