equal
deleted
inserted
replaced
114 UIDevice* device = [UIDevice currentDevice]; |
114 UIDevice* device = [UIDevice currentDevice]; |
115 if ([device respondsToSelector:@selector(isMultitaskingSupported)] && |
115 if ([device respondsToSelector:@selector(isMultitaskingSupported)] && |
116 device.multitaskingSupported && |
116 device.multitaskingSupported && |
117 self.isInGame) { |
117 self.isInGame) { |
118 // let's try to be permissive with multitasking here... |
118 // let's try to be permissive with multitasking here... |
119 NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; |
119 if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"multitasking"] boolValue]) |
120 if ([[settings objectForKey:@"multitasking"] boolValue]) |
|
121 HW_suspend(); |
120 HW_suspend(); |
122 else { |
121 else { |
123 // so the game returns to the configuration view |
122 // so the game returns to the configuration view |
124 if (isGameRunning()) |
123 if (isGameRunning()) |
125 HW_terminate(NO); |
124 HW_terminate(NO); |
126 else { |
125 else { |
127 // while screen is loading you can't call HW_terminate() so we close the app |
126 // while screen is loading you can't call HW_terminate() so we close the app |
128 [self applicationWillTerminate:application]; |
127 [self applicationWillTerminate:application]; |
129 } |
128 } |
130 } |
129 } |
131 [settings release]; |
|
132 } |
130 } |
133 } |
131 } |
134 |
132 |
135 -(void) applicationDidBecomeActive:(UIApplication *)application { |
133 -(void) applicationDidBecomeActive:(UIApplication *)application { |
136 //[super applicationDidBecomeActive:application]; |
134 //[super applicationDidBecomeActive:application]; |