hedgewars/uMobile.pas
changeset 5994 3c578f531cc1
parent 5180 a881cd3d3163
child 6247 6dfad55fd71c
--- a/hedgewars/uMobile.pas	Thu Sep 22 23:20:11 2011 +0200
+++ b/hedgewars/uMobile.pas	Fri Sep 23 09:58:41 2011 +0200
@@ -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