hedgewars/uKeys.pas
changeset 2905 f3c79f7193a9
parent 2805 36a8cebb91e8
child 2948 3f21a9dc93d0
--- a/hedgewars/uKeys.pas	Mon Mar 01 19:20:43 2010 +0000
+++ b/hedgewars/uKeys.pas	Mon Mar 01 19:54:33 2010 +0000
@@ -28,7 +28,7 @@
 procedure init_uKeys;
 procedure free_uKeys;
 
-function  KeyNameToCode(name: string): word;
+function  KeyNameToCode(name: shortstring): word;
 procedure ProcessKbd;
 procedure ResetKbd;
 procedure FreezeEnterKey;
@@ -90,7 +90,7 @@
 var tkbd, tkbdn: TKeyboardState;
     KeyNames: array [0..cKeyMaxIndex] of string[15];
 	
-function KeyNameToCode(name: string): word;
+function KeyNameToCode(name: shortstring): word;
 var code: Word;
 begin
 	code:= cKeyMaxIndex;
@@ -261,7 +261,7 @@
 
 for i:= 6 to cKeyMaxIndex do
 	begin
-    	s:= string(sdl_getkeyname(i));
+    	s:= shortstring(sdl_getkeyname(i));
 	//writeln(stdout,inttostr(i) + ': ' + s);
     	if s = 'unknown key' then KeyNames[i]:= ''
        	else begin