hedgewars/uInputHandler.pas
branchsdl2transition
changeset 11368 c481d087f653
parent 11365 b8b208501475
child 11403 b894922d58cc
child 11486 2b30283a402c
--- a/hedgewars/uInputHandler.pas	Wed Nov 11 21:59:06 2015 +0100
+++ b/hedgewars/uInputHandler.pas	Wed Nov 11 23:29:49 2015 +0100
@@ -326,7 +326,7 @@
 
 
     // get the size of keyboard array
-    SDL_GetKeyState(@k);
+    SDL_GetKeyboardState(@k);
 
     // Controller(s)
     for j:= 0 to Pred(ControllerNumControllers) do
@@ -462,7 +462,7 @@
 var
     k: LongInt;
 begin
-    SDL_GetKeyState(@k);
+    SDL_GetKeyboardState(@k);
     k:= k + joy * (ControllerNumAxes[joy]*2 + ControllerNumHats[joy]*4 + ControllerNumButtons[joy]*2);
     ProcessKey(k +  axis*2, value > 20000);
     ProcessKey(k + (axis*2)+1, value < -20000);
@@ -472,7 +472,7 @@
 var
     k: LongInt;
 begin
-    SDL_GetKeyState(@k);
+    SDL_GetKeyboardState(@k);
     k:= k + joy * (ControllerNumAxes[joy]*2 + ControllerNumHats[joy]*4 + ControllerNumButtons[joy]*2);
     ProcessKey(k +  ControllerNumAxes[joy]*2 + hat*4 + 0, (value and SDL_HAT_UP)   <> 0);
     ProcessKey(k +  ControllerNumAxes[joy]*2 + hat*4 + 1, (value and SDL_HAT_RIGHT)<> 0);
@@ -484,7 +484,7 @@
 var
     k: LongInt;
 begin
-    SDL_GetKeyState(@k);
+    SDL_GetKeyboardState(@k);
     k:= k + joy * (ControllerNumAxes[joy]*2 + ControllerNumHats[joy]*4 + ControllerNumButtons[joy]*2);
     ProcessKey(k +  ControllerNumAxes[joy]*2 + ControllerNumHats[joy]*4 + button, pressed);
 end;