project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m
changeset 5109 6d2e8a24277e
parent 5106 517bdd3865f1
child 5154 851f36579ed4
equal deleted inserted replaced
5106:517bdd3865f1 5109:6d2e8a24277e
   209     // don't clean mainMenuViewController here!!!
   209     // don't clean mainMenuViewController here!!!
   210     MSG_MEMCLEAN();
   210     MSG_MEMCLEAN();
   211     print_free_memory();
   211     print_free_memory();
   212 }
   212 }
   213 
   213 
       
   214 //TODO: when the SDLUIKitDelegate methods applicationWillResignActive and applicationDidBecomeActive do work
       
   215 // you'll be able to remove the methods below and just handle the SDL_WINDOWEVENT_MINIMIZED/SDL_WINDOWEVENT_RESTORED
       
   216 // events in the MainLoop
       
   217 
   214 -(void) applicationWillResignActive:(UIApplication *)application {
   218 -(void) applicationWillResignActive:(UIApplication *)application {
   215     [super applicationWillResignActive: application];
   219     //[super applicationWillResignActive:application];
   216 
   220 
   217     UIDevice* device = [UIDevice currentDevice];
   221     UIDevice* device = [UIDevice currentDevice];
   218     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
   222     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
   219          device.multitaskingSupported &&
   223          device.multitaskingSupported &&
   220          self.isInGame) {
   224          self.isInGame) {
   234         [settings release];
   238         [settings release];
   235     }
   239     }
   236 }
   240 }
   237 
   241 
   238 -(void) applicationDidBecomeActive:(UIApplication *)application {
   242 -(void) applicationDidBecomeActive:(UIApplication *)application {
   239     [super applicationDidBecomeActive:application];
   243     //[super applicationDidBecomeActive:application];
   240 
   244 
   241     UIDevice* device = [UIDevice currentDevice];
   245     UIDevice* device = [UIDevice currentDevice];
   242     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
   246     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
   243          device.multitaskingSupported &&
   247          device.multitaskingSupported &&
   244          self.isInGame) {
   248          self.isInGame) {