Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information
slouken committed Oct 17, 2009
1 parent e310137 commit e344bc095a0506d578072cb7e08aba5ed3fe2e31

File 6 of 7 in e344bc0

@@ -56,6 +56,7 @@ int main(int argc, char **argv) {
@implementation SDLUIKitDelegate

@synthesize window;
@synthesize windowID;

/* convenience method */
+(SDLUIKitDelegate *)sharedAppDelegate {
@@ -66,6 +67,7 @@ +(SDLUIKitDelegate *)sharedAppDelegate {
- (id)init {
self = [super init];
window = nil;
windowID = 0;
return self;
}

@@ -97,6 +99,20 @@ - (void)applicationWillTerminate:(UIApplication *)application {

}

- (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];

0 comments on commit e344bc0

Please sign in to comment.