correctly use USE_TOUCH_INTERFACE
authorkoda
Mon, 28 Oct 2013 17:03:20 +0100
changeset 9651 c0a389ccb0c1
parent 9650 1c7c87ce37fd
child 9652 b787bf466bdb
correctly use USE_TOUCH_INTERFACE
hedgewars/hwengine.pas
hedgewars/uGame.pas
hedgewars/uGears.pas
--- a/hedgewars/hwengine.pas	Mon Oct 28 16:53:20 2013 +0100
+++ b/hedgewars/hwengine.pas	Mon Oct 28 17:03:20 2013 +0100
@@ -190,7 +190,7 @@
                         cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight);
                         cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF};
                     end;
-
+{$IFDEF USE_TOUCH_INTERFACE}
                 SDL_FINGERMOTION:
                     onTouchMotion(event.tfinger.x, event.tfinger.y, event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId);
 
@@ -199,6 +199,7 @@
 
                 SDL_FINGERUP:
                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
+{$ENDIF}
 {$ELSE}
                 SDL_KEYDOWN:
                     if GameState = gsChat then
--- a/hedgewars/uGame.pas	Mon Oct 28 16:53:20 2013 +0100
+++ b/hedgewars/uGame.pas	Mon Oct 28 17:03:20 2013 +0100
@@ -90,7 +90,7 @@
         if CurrentHedgehog^.BotLevel <> 0 then
             ProcessBot;
         ProcessGears;
-        {$IFDEF SDL2}ProcessTouch;{$ENDIF}
+        {$IFDEF USE_TOUCH_INTERFACE}ProcessTouch;{$ENDIF}
         end
     else
         begin
--- a/hedgewars/uGears.pas	Mon Oct 28 16:53:20 2013 +0100
+++ b/hedgewars/uGears.pas	Mon Oct 28 17:03:20 2013 +0100
@@ -48,7 +48,8 @@
 function  GearByUID(uid : Longword) : PGear;
 
 implementation
-uses uStore, uSound, uTeams, uRandom, uIO, uLandGraphics, {$IFDEF SDL2}uTouch,{$ENDIF}
+uses uStore, uSound, uTeams, uRandom, uIO, uLandGraphics,
+    {$IFDEF USE_TOUCH_INTERFACE}uTouch,{$ENDIF}
     uLocale, uAmmos, uStats, uVisualGears, uScript, uVariables,
     uCommands, uUtils, uTextures, uRenderUtils, uGearsRender, uCaptions, uDebug, uLandTexture,
     uGearsHedgehog, uGearsUtils, uGearsList, uGearsHandlersRope
@@ -172,7 +173,7 @@
 if GameTicks = NewTurnTick then
     begin
     ScriptCall('onNewTurn');
-{$IFDEF SDL2}
+{$IFDEF USE_TOUCH_INTERFACE}
     uTouch.NewTurnBeginning();
 {$ENDIF}
     end;