Commit b573c181 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Re-enable event posting in VLCEventManager.

parent fb1e7461
...@@ -209,7 +209,7 @@ static void * EventDispatcherMainLoop(void * user_data) ...@@ -209,7 +209,7 @@ static void * EventDispatcherMainLoop(void * user_data)
- (void)callOnMainThreadDelegateOfObject:(id)aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName - (void)callOnMainThreadDelegateOfObject:(id)aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName
{ {
/* Don't send on main thread before this gets sorted out */ /* Don't send on main thread before this gets sorted out */
// NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
message_t message = message_t message =
{ {
...@@ -219,19 +219,19 @@ static void * EventDispatcherMainLoop(void * user_data) ...@@ -219,19 +219,19 @@ static void * EventDispatcherMainLoop(void * user_data)
VLCNotification VLCNotification
}; };
// if( [NSThread isMainThread] ) if( [NSThread isMainThread] )
// { {
[self callDelegateOfObjectAndSendNotificationWithArgs:[[NSData dataWithBytes:&message length:sizeof(message_t)] retain] /* released in the call */]; [self callDelegateOfObjectAndSendNotificationWithArgs:[[NSData dataWithBytes:&message length:sizeof(message_t)] retain] /* released in the call */];
// } }
// else else
// { {
// pthread_mutex_lock( [self queueLock] ); pthread_mutex_lock( [self queueLock] );
// [[self messageQueue] insertObject:[NSData dataWithBytes:&message length:sizeof(message_t)] atIndex:0]; [[self messageQueue] insertObject:[NSData dataWithBytes:&message length:sizeof(message_t)] atIndex:0];
// pthread_cond_signal( [self signalData] ); pthread_cond_signal( [self signalData] );
// pthread_mutex_unlock( [self queueLock] ); pthread_mutex_unlock( [self queueLock] );
// } }
// [pool release]; [pool release];
} }
- (void)callOnMainThreadObject:(id)aTarget withMethod:(SEL)aSelector withArgumentAsObject: (id)arg - (void)callOnMainThreadObject:(id)aTarget withMethod:(SEL)aSelector withArgumentAsObject: (id)arg
...@@ -278,7 +278,7 @@ static void * EventDispatcherMainLoop(void * user_data) ...@@ -278,7 +278,7 @@ static void * EventDispatcherMainLoop(void * user_data)
- (void)callDelegateOfObject:(id) aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName - (void)callDelegateOfObject:(id) aTarget withDelegateMethod:(SEL)aSelector withNotificationName: (NSString *)aNotificationName
{ {
// [[NSNotificationCenter defaultCenter] postNotification: [NSNotification notificationWithName:aNotificationName object:aTarget]]; [[NSNotificationCenter defaultCenter] postNotification: [NSNotification notificationWithName:aNotificationName object:aTarget]];
if (![aTarget delegate] || ![[aTarget delegate] respondsToSelector:aSelector]) if (![aTarget delegate] || ![[aTarget delegate] respondsToSelector:aSelector])
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment