hedgewars/uMobile.pas
branch0.9.16
changeset 5995 647d52370ce9
parent 5994 3c578f531cc1
child 6247 6dfad55fd71c
--- a/hedgewars/uMobile.pas	Mon Sep 19 19:12:19 2011 +0200
+++ b/hedgewars/uMobile.pas	Sun Sep 25 10:48:18 2011 -0400
@@ -38,7 +38,7 @@
 
 procedure GameLoading; inline;
 procedure GameLoaded; inline;
-procedure AmmoUpdate; // don't inline
+procedure AmmoUpdate; // do not inline
 procedure NewTurnBeginning; inline;
 procedure SaveBegan; inline;
 procedure SaveFinished; inline;
@@ -46,6 +46,7 @@
 implementation
 uses uVariables;
 
+// this function is just to determine whether we are running on a limited screen device
 function isPhone: Boolean; inline;
 begin
 {$IFDEF IPHONEOS}
@@ -54,12 +55,17 @@
     exit(false);
 end;
 
+// this function should make the device vibrate in some way
 procedure performRumble; inline;
 const kSystemSoundID_Vibrate = $00000FFF;
 begin
+    // do not vibrate while synchronising a demo/save
+    if not fastUntilLag then
+        begin
 {$IFDEF IPHONEOS}
-    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
+        AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
 {$ENDIF}
+        end;
 end;
 
 procedure GameLoading; inline;
@@ -76,7 +82,7 @@
 {$ENDIF}
 end;
 
-procedure AmmoUpdate; // don't inline
+procedure AmmoUpdate; // do not inline
 begin
 {$IFDEF IPHONEOS}
     if (CurrentTeam = nil) or