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
This commit is contained in:
stephena 2015-09-12 21:28:30 +00:00
parent 92fcba53a5
commit 5620c270bc
3 changed files with 9 additions and 6 deletions

View File

@ -64,7 +64,7 @@
<key>NSMainNibFile</key> <key>NSMainNibFile</key>
<string>SDLMain.nib</string> <string>SDLMain.nib</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string>NSApplication</string> <string>SDLApplication</string>
<key>«PROJECTNAMEASXML»</key> <key>«PROJECTNAMEASXML»</key>
<string>SDL Cocoa App</string> <string>SDL Cocoa App</string>
</dict> </dict>

View File

@ -14,3 +14,9 @@
+ (SDLMain *)sharedInstance; + (SDLMain *)sharedInstance;
@end @end
@interface SDLApplication : NSApplication {
}
@end

View File

@ -79,11 +79,7 @@ static NSString *getApplicationName(void)
#endif #endif
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
@interface NSApplication (SDLApplication) @implementation SDLApplication
@end
// --------------------------------------------------------------------------------
@implementation NSApplication (SDLApplication)
/* Invoked from the Quit menu item */ /* Invoked from the Quit menu item */
- (void)terminate:(id)sender - (void)terminate:(id)sender
{ {
@ -91,6 +87,7 @@ static NSString *getApplicationName(void)
SDL_Event event; SDL_Event event;
event.type = SDL_QUIT; event.type = SDL_QUIT;
SDL_PushEvent(&event); SDL_PushEvent(&event);
[super terminate:sender];
} }
@end @end