src/video/uikit/SDL_uikitappdelegate.m
changeset 3400 4ec48602f1db
parent 2859 99210400e8b9
child 3422 ec4db979dddb
     1.1 --- a/src/video/uikit/SDL_uikitappdelegate.m	Tue Oct 13 20:17:11 2009 +0000
     1.2 +++ b/src/video/uikit/SDL_uikitappdelegate.m	Sat Oct 17 07:36:45 2009 +0000
     1.3 @@ -56,6 +56,7 @@
     1.4  @implementation SDLUIKitDelegate
     1.5  
     1.6  @synthesize window;
     1.7 +@synthesize windowID;
     1.8  
     1.9  /* convenience method */
    1.10  +(SDLUIKitDelegate *)sharedAppDelegate {
    1.11 @@ -66,6 +67,7 @@
    1.12  - (id)init {
    1.13  	self = [super init];
    1.14  	window = nil;
    1.15 +	windowID = 0;
    1.16  	return self;
    1.17  }
    1.18  
    1.19 @@ -97,6 +99,20 @@
    1.20  	
    1.21  }
    1.22  
    1.23 +- (void) applicationWillResignActive:(UIApplication*)application
    1.24 +{
    1.25 +//	NSLog(@"%@", NSStringFromSelector(_cmd));
    1.26 +	SDL_SendWindowEvent(self.windowID, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
    1.27 +}
    1.28 +
    1.29 +- (void) applicationDidBecomeActive:(UIApplication*)application
    1.30 +{
    1.31 +//	NSLog(@"%@", NSStringFromSelector(_cmd));
    1.32 +	SDL_SendWindowEvent(self.windowID, SDL_WINDOWEVENT_RESTORED, 0, 0);
    1.33 +}
    1.34 +
    1.35 +
    1.36 +
    1.37  -(void)dealloc {
    1.38  	[window release];
    1.39  	[super dealloc];