--- a/hedgewars/uCursor.pas Thu Apr 18 19:44:25 2019 +0200
+++ b/hedgewars/uCursor.pas Thu Apr 18 20:02:45 2019 +0200
@@ -1,3 +1,5 @@
+{$INCLUDE "options.inc"}
+
unit uCursor;
interface
@@ -17,7 +19,9 @@
begin
SDL_ShowCursor(SDL_DISABLE);
resetPosition();
+{$IFNDEF USE_TOUCH_INTERFACE}
SDL_SetRelativeMouseMode(SDL_TRUE);
+{$ENDIF}
end;
procedure resetPosition;
--- a/hedgewars/uWorld.pas Thu Apr 18 19:44:25 2019 +0200
+++ b/hedgewars/uWorld.pas Thu Apr 18 20:02:45 2019 +0200
@@ -2148,18 +2148,24 @@
begin
if isPaused or isAFK or (GameState = gsConfirm) then
begin
+{$IFNDEF USE_TOUCH_INTERFACE}
SDL_SetRelativeMouseMode(SDL_FALSE);
+{$ENDIF}
if SDL_ShowCursor(SDL_QUERY) = SDL_DISABLE then
begin
uCursor.resetPosition;
+{$IFNDEF USE_TOUCH_INTERFACE}
SDL_ShowCursor(SDL_ENABLE);
+{$ENDIF}
end;
end
else
begin
uCursor.resetPositionDelta;
+{$IFNDEF USE_TOUCH_INTERFACE}
SDL_ShowCursor(SDL_DISABLE);
SDL_SetRelativeMouseMode(SDL_TRUE);
+{$ENDIF}
end;
end;