# HG changeset patch # User Sam Lantinga # Date 1297526255 28800 # Node ID e107518710f6394383283382043d4e49b198c8ef # Parent 48724afcdc6e94e98f128a5e8d7b1299678ad593 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? diff -r 48724afcdc6e -r e107518710f6 src/video/cocoa/SDL_cocoaevents.m --- a/src/video/cocoa/SDL_cocoaevents.m Sat Feb 12 00:42:39 2011 -0800 +++ b/src/video/cocoa/SDL_cocoaevents.m Sat Feb 12 07:57:35 2011 -0800 @@ -40,13 +40,6 @@ - (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 @@ if ([NSApp delegate] == nil) { [NSApp setDelegate:[[SDLAppDelegate alloc] init]]; } - [NSApp setRunning]; [pool release]; } @@ -185,7 +177,7 @@ } pool = [[NSAutoreleasePool alloc] init]; - while ([NSApp isRunning]) { + for ( ; ; ) { NSEvent *event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES ]; if ( event == nil ) { break;