project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m
branchhedgeroid
changeset 5530 25d4118056e1
parent 5503 d8632f589008
child 5662 99083392cd4f
--- a/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m	Tue Aug 09 21:31:49 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m	Tue Aug 09 21:41:52 2011 +0200
@@ -144,10 +144,9 @@
 -(void) applicationWillResignActive:(UIApplication *)application {
     //[super applicationWillResignActive:application];
 
-    UIDevice* device = [UIDevice currentDevice];
+    UIDevice *device = [UIDevice currentDevice];
     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
-         device.multitaskingSupported &&
-         self.isInGame) {
+         [device isMultitaskingSupported] && self.isInGame) {
         // let's try to be permissive with multitasking here...
         if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"multitasking"] boolValue])
             HW_suspend();
@@ -166,10 +165,9 @@
 -(void) applicationDidBecomeActive:(UIApplication *)application {
     //[super applicationDidBecomeActive:application];
 
-    UIDevice* device = [UIDevice currentDevice];
+    UIDevice *device = [UIDevice currentDevice];
     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
-         device.multitaskingSupported &&
-         self.isInGame) {
+         [device isMultitaskingSupported] && self.isInGame) {
         HW_resume();
     }
 }