From 5620c270bc62b7054343a7b82b1662e755d8edf2 Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 12 Sep 2015 21:28:30 +0000 Subject: [PATCH] Finally fixed the annoying warning when building under OSX. It was referring to Objective-C categories vs. subclasses. I'm really glad I don't have to know anything further about Objective-C :) git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3202 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/macosx/Info-Stella.plist | 2 +- src/macosx/SDLMain.h | 6 ++++++ src/macosx/SDLMain.m | 7 ++----- 3 files changed, 9 insertions(+), 6 deletions(-) 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