From: Felix Paul Kühne Date: Sat, 4 Feb 2012 16:14:36 +0000 (+0100) Subject: macosx: force some more methods to run on the main thread (refs #5779) X-Git-Tag: 2.1.0-git~5869 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=da2ee7c7c0820dff6dce29274fe213b1a4279c1b;p=vlc macosx: force some more methods to run on the main thread (refs #5779) --- diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 7d906dcf4c..d1b465c9c4 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -295,7 +295,7 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var, break; case INPUT_EVENT_ITEM_NAME: - [[VLCMain sharedInstance] updateName]; + [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateName) withObject: nil waitUntilDone:NO]; [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(playlistUpdated) withObject: nil waitUntilDone:NO]; break; @@ -305,12 +305,12 @@ static int InputEvent( vlc_object_t *p_this, const char *psz_var, break; case INPUT_EVENT_DEAD: - [[VLCMain sharedInstance] updateName]; + [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateName) withObject: nil waitUntilDone:NO]; [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updatePlaybackPosition) withObject:nil waitUntilDone:NO]; break; case INPUT_EVENT_ABORT: - [[VLCMain sharedInstance] updateName]; + [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateName) withObject: nil waitUntilDone:NO]; [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updatePlaybackPosition) withObject:nil waitUntilDone:NO]; break; @@ -347,7 +347,7 @@ static int PlaybackModeUpdated( vlc_object_t *p_this, const char *psz_var, vlc_value_t oldval, vlc_value_t new_val, void *param ) { NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init]; - [[VLCMain sharedInstance] playbackModeUpdated]; + [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(playbackModeUpdated) withObject:nil waitUntilDone:NO]; [o_pool release]; return VLC_SUCCESS; @@ -399,7 +399,7 @@ static int FullscreenChanged( vlc_object_t *p_this, const char *psz_variable, if (p_intf) { NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init]; - [[VLCMain sharedInstance] fullscreenChanged]; + [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(fullscreenChanged) withObject:nil waitUntilDone:NO]; [o_pool release]; } return VLC_SUCCESS;