hedgewars/hwengine.pas
branchqmlfrontend
changeset 11611 99966b4a6e1e
parent 11549 b69f5f22a3ba
parent 11553 45982bda46cc
child 11638 215b837c16f9
--- a/hedgewars/hwengine.pas	Tue Feb 09 21:11:16 2016 +0300
+++ b/hedgewars/hwengine.pas	Mon Mar 14 22:08:27 2016 +0300
@@ -173,21 +173,6 @@
                     if (GameState <> gsChat) and (GameState >= gsGame) then
                         ProcessKey(event.key);
 
-                SDL_MOUSEBUTTONDOWN:
-                    if GameState = gsConfirm then
-                        ParseCommand('quit', true)
-                    else
-                        if (GameState >= gsGame) then ProcessMouse(event.button, true);
-
-                SDL_MOUSEBUTTONUP:
-                    if (GameState >= gsGame) then ProcessMouse(event.button, false);
-
-                SDL_MOUSEWHEEL:
-                    begin
-                    wheelEvent:= true;
-                    ProcessMouseWheel(event.wheel.x, event.wheel.y);
-                    end;
-
                 SDL_TEXTINPUT: if GameState = gsChat then uChat.TextInput(event.text);
 
                 SDL_WINDOWEVENT:
@@ -234,7 +219,23 @@
 
                 SDL_FINGERUP:
                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
+{$ELSE}
+                SDL_MOUSEBUTTONDOWN:
+                    if GameState = gsConfirm then
+                        ParseCommand('quit', true)
+                    else
+                        if (GameState >= gsGame) then ProcessMouse(event.button, true);
+
+                SDL_MOUSEBUTTONUP:
+                    if (GameState >= gsGame) then ProcessMouse(event.button, false);
+
+                SDL_MOUSEWHEEL:
+                    begin
+                    wheelEvent:= true;
+                    ProcessMouseWheel(event.wheel.x, event.wheel.y);
+                    end;
 {$ENDIF}
+
                 SDL_JOYAXISMOTION:
                     ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value);
                 SDL_JOYHATMOTION: