(platform_apple.c) Some cleanups

This commit is contained in:
twinaphex 2015-01-11 06:51:43 +01:00
parent 9a39abfbf0
commit 16b7ca63c3

View File

@ -106,24 +106,24 @@ static void do_iteration(void)
void apple_start_iteration(void)
{
if (iterate_observer == NULL)
{
iterate_observer =
if (iterate_observer)
return;
iterate_observer =
CFRunLoopObserverCreate(0, kCFRunLoopBeforeWaiting,
true, 0, (CFRunLoopObserverCallBack)do_iteration, 0);
CFRunLoopAddObserver(CFRunLoopGetMain(), iterate_observer,
kCFRunLoopCommonModes);
}
true, 0, (CFRunLoopObserverCallBack)do_iteration, 0);
CFRunLoopAddObserver(CFRunLoopGetMain(), iterate_observer,
kCFRunLoopCommonModes);
}
void apple_stop_iteration(void)
{
if (iterate_observer != NULL)
{
CFRunLoopObserverInvalidate(iterate_observer);
CFRelease(iterate_observer);
iterate_observer = NULL;
}
if (!iterate_observer)
return;
CFRunLoopObserverInvalidate(iterate_observer);
CFRelease(iterate_observer);
iterate_observer = NULL;
}
static void frontend_apple_get_environment_settings(int *argc, char *argv[],