prevent screen locking while synching saves (can take some time)
authorkoda
Thu, 22 Sep 2011 15:30:40 +0200
changeset 5992 a311b8461ec9
parent 5991 c3b7064d9226
child 5993 412ada3d2041
prevent screen locking while synching saves (can take some time)
project_files/HedgewarsMobile/Classes/ObjcExports.m
--- a/project_files/HedgewarsMobile/Classes/ObjcExports.m	Thu Sep 22 17:19:39 2011 +0400
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m	Thu Sep 22 15:30:40 2011 +0200
@@ -102,6 +102,7 @@
 void saveBeganSynching() {
     savedGame = YES;
     stopSpinningProgress();
+    [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
 
     overlay_instance.view.backgroundColor = [UIColor blackColor];
     overlay_instance.view.alpha = 0.75;
@@ -128,6 +129,7 @@
     [overlay_instance.savesIndicator stopAnimating];
     [overlay_instance.savesIndicator performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
 
+    [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
     gameRunning = YES;
 }