diff --git a/src/macosx/Info-Stella.plist b/src/macosx/Info-Stella.plist index bb90b3564..b4c7ebfc2 100644 --- a/src/macosx/Info-Stella.plist +++ b/src/macosx/Info-Stella.plist @@ -64,7 +64,7 @@ NSMainNibFile SDLMain.nib NSPrincipalClass - NSApplication + SDLApplication «PROJECTNAMEASXML» SDL Cocoa App diff --git a/src/macosx/SDLMain.h b/src/macosx/SDLMain.h index f6c5d0ce8..919f90b3f 100644 --- a/src/macosx/SDLMain.h +++ b/src/macosx/SDLMain.h @@ -14,3 +14,9 @@ + (SDLMain *)sharedInstance; @end + +@interface SDLApplication : NSApplication { + +} + +@end diff --git a/src/macosx/SDLMain.m b/src/macosx/SDLMain.m index b0e6919ba..acbd915f1 100644 --- a/src/macosx/SDLMain.m +++ b/src/macosx/SDLMain.m @@ -79,11 +79,7 @@ static NSString *getApplicationName(void) #endif // -------------------------------------------------------------------------------- -@interface NSApplication (SDLApplication) -@end - -// -------------------------------------------------------------------------------- -@implementation NSApplication (SDLApplication) +@implementation SDLApplication /* Invoked from the Quit menu item */ - (void)terminate:(id)sender { @@ -91,6 +87,7 @@ static NSString *getApplicationName(void) SDL_Event event; event.type = SDL_QUIT; SDL_PushEvent(&event); + [super terminate:sender]; } @end