project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
changeset 4540 9b614e420de5
parent 4510 ce9b8206e681
child 4547 b70004a576a3
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Thu Dec 16 00:48:32 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Thu Dec 16 01:45:15 2010 +0100
@@ -232,8 +232,9 @@
     if ([device respondsToSelector:@selector(isMultitaskingSupported)] &&
          device.multitaskingSupported &&
          self.isInGame) {
-        // multiasking in-game works only for ios >= 4.2, returns a black screen on other verions
-        if (NSClassFromString(@"UIPrintInfo"))
+        // let's try to be permissive with multitasking here...
+        NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
+        if ([[settings objectForKey:@"multitasking"] boolValue])
             HW_suspend();
         else {
             // so the game returns to the configuration view
@@ -246,6 +247,7 @@
                 longjmp(*(jump_env()), 1);
             }
         }
+        [settings release];
     }
 }