changeset 5271:e107518710f6

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?
author Sam Lantinga <slouken@libsdl.org>
date Sat, 12 Feb 2011 07:57:35 -0800
parents 48724afcdc6e
children 93ea62a5ba8f
files src/video/cocoa/SDL_cocoaevents.m
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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;