Sfoglia il codice sorgente

use native sys_getch

Nicolas Cannasse 12 anni fa
parent
commit
7f29557461
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -1711,7 +1711,7 @@ let std_lib =
 		);
 		"sys_getch", Fun1 (fun echo ->
 			match echo with
-			| VBool _ -> VInt (int_of_char (input_char Pervasives.stdin))
+			| VBool b -> VInt (Extc.getch b)
 			| _ -> error()
 		);
 		"sys_get_pid", Fun0 (fun() ->