hedgewars/uInputHandler.pas
branchsdl2transition
changeset 11365 b8b208501475
parent 11362 ed5a6478e710
child 11368 c481d087f653
--- a/hedgewars/uInputHandler.pas	Tue Nov 10 22:37:54 2015 +0100
+++ b/hedgewars/uInputHandler.pas	Wed Nov 11 19:25:56 2015 +0100
@@ -210,7 +210,8 @@
 procedure ProcessKey(event: TSDL_KeyboardEvent); inline;
 var code: LongInt;
 begin
-    code:= event.keysym.scancode;
+    // TODO
+    code:= LongInt(event.keysym.scancode);
     //writelntoconsole('[KEY] '+inttostr(code)+ ' -> ''' +KeyNames[code] + ''', type = '+inttostr(event.type_));
     ProcessKey(code, event.type_ = SDL_KEYDOWN);
 end;
@@ -315,7 +316,7 @@
 
     for i:= 0 to cKeyMaxIndex - 5 do
         begin
-        s:= shortstring(SDL_GetScancodeName(i));
+        s:= shortstring(SDL_GetScancodeName(TSDL_Scancode(i)));
 
         for t:= 1 to Length(s) do
             if s[t] = ' ' then