iPhone interruption patch / SDL 1.3

Eric Wing to Sam

I've been sitting on this too long. I need to push.
It's untested because of the unrelated crashing bug I've been experiencing.
Also have a fix for SIZEOF_VOIDP in the config for both iPhone and Mac.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404102
This commit is contained in:
Sam Lantinga 2009-10-17 07:36:45 +00:00
parent f22214ce9b
commit f2ae715bf4
7 changed files with 44 additions and 4 deletions

View file

@ -56,6 +56,7 @@ int main(int argc, char **argv) {
@implementation SDLUIKitDelegate
@synthesize window;
@synthesize windowID;
/* convenience method */
+(SDLUIKitDelegate *)sharedAppDelegate {
@ -66,6 +67,7 @@ int main(int argc, char **argv) {
- (id)init {
self = [super init];
window = nil;
windowID = 0;
return self;
}
@ -97,6 +99,20 @@ int main(int argc, char **argv) {
}
- (void) applicationWillResignActive:(UIApplication*)application
{
// NSLog(@"%@", NSStringFromSelector(_cmd));
SDL_SendWindowEvent(self.windowID, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
}
- (void) applicationDidBecomeActive:(UIApplication*)application
{
// NSLog(@"%@", NSStringFromSelector(_cmd));
SDL_SendWindowEvent(self.windowID, SDL_WINDOWEVENT_RESTORED, 0, 0);
}
-(void)dealloc {
[window release];
[super dealloc];