Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoaevents.m @ 1936:83946ee0ff1f
Implemented OpenGL support on Mac OS X
The OpenGL renderer works without changes, yay! :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 25 Jul 2006 06:22:42 +0000 |
parents | dc864bcabcc4 |
children | 05e88d266921 |
comparison
equal
deleted
inserted
replaced
1935:8a9b367a80f3 | 1936:83946ee0ff1f |
---|---|
28 @interface NSApplication(NSAppleMenu) | 28 @interface NSApplication(NSAppleMenu) |
29 - (void)setAppleMenu:(NSMenu *)menu; | 29 - (void)setAppleMenu:(NSMenu *)menu; |
30 @end | 30 @end |
31 #endif | 31 #endif |
32 | 32 |
33 @interface SDLApplication : NSApplication | 33 @implementation NSApplication(SDL) |
34 - (void)setRunning | |
34 { | 35 { |
35 } | |
36 - (void)finishLaunching; | |
37 @end | |
38 | |
39 @implementation SDLApplication | |
40 | |
41 - (void)finishLaunching | |
42 { | |
43 [super finishLaunching]; | |
44 _running = 1; | 36 _running = 1; |
45 } | 37 } |
46 | |
47 @end | 38 @end |
48 | 39 |
49 static NSString * | 40 static NSString * |
50 GetApplicationName(void) | 41 GetApplicationName(void) |
51 { | 42 { |
139 SetFrontProcess(&psn); | 130 SetFrontProcess(&psn); |
140 } | 131 } |
141 | 132 |
142 pool = [[NSAutoreleasePool alloc] init]; | 133 pool = [[NSAutoreleasePool alloc] init]; |
143 if (NSApp == nil) { | 134 if (NSApp == nil) { |
144 [SDLApplication sharedApplication]; | 135 [NSApplication sharedApplication]; |
145 | 136 |
146 if ([NSApp mainMenu] == nil) { | 137 if ([NSApp mainMenu] == nil) { |
147 CreateApplicationMenus(); | 138 CreateApplicationMenus(); |
148 } | 139 } |
149 [NSApp finishLaunching]; | 140 [NSApp finishLaunching]; |
150 } | 141 } |
142 [NSApp setRunning]; | |
151 [pool release]; | 143 [pool release]; |
152 } | 144 } |
153 | 145 |
154 void | 146 void |
155 Cocoa_PumpEvents(_THIS) | 147 Cocoa_PumpEvents(_THIS) |