From 172849d5e7c3b5b37213da92698a6b0550a2e91b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 12 Feb 2011 07:57:35 -0800 Subject: [PATCH] Removed private API use that was causing AppStore rejection Pavel Kanzelsberger to SDL I tried to submit a SDL application to the Mac AppStore and it got rejected because SDL cocoa is using a Private (non-public) API. Problematic part is here: SDL_cocoaevents.m @implementation NSApplication(SDL) - (void)setRunning { _running = 1; } @end Symbol _running in NSApplication is private and shouldn't be used. Any ideas what could I do about this? --- src/video/cocoa/SDL_cocoaevents.m | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index 170f3e63b..db5c2bf94 100644 --- a/src/video/cocoa/SDL_cocoaevents.m +++ b/src/video/cocoa/SDL_cocoaevents.m @@ -40,13 +40,6 @@ @interface NSApplication(NSAppleMenu) - (void)setAppleMenu:(NSMenu *)menu; @end -@implementation NSApplication(SDL) -- (void)setRunning -{ - _running = 1; -} -@end - @interface SDLAppDelegate : NSObject - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; @end @@ -164,7 +157,6 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende if ([NSApp delegate] == nil) { [NSApp setDelegate:[[SDLAppDelegate alloc] init]]; } - [NSApp setRunning]; [pool release]; } @@ -185,7 +177,7 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende } pool = [[NSAutoreleasePool alloc] init]; - while ([NSApp isRunning]) { + for ( ; ; ) { NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES ]; if ( event == nil ) { break;