Browse Source

use native sys_getch

Nicolas Cannasse 12 năm trước cách đây
mục cha
commit
7f29557461
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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() ->