Mercurial > sdl-ios-xcode
diff src/video/cocoa/SDL_cocoaevents.m @ 5281:15a71bec4a55
merged
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Sat, 12 Feb 2011 19:16:09 -0800 |
parents | e107518710f6 |
children |
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoaevents.m Sun Feb 06 23:48:31 2011 -0800 +++ b/src/video/cocoa/SDL_cocoaevents.m Sat Feb 12 19:16:09 2011 -0800 @@ -1,6 +1,6 @@ /* SDL - Simple DirectMedia Layer - Copyright (C) 1997-2010 Sam Lantinga + Copyright (C) 1997-2011 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -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;