Use TCSADRAIN instead of TCSAFLUSH when initializing raw mode

develop
lethosor 2015-04-19 11:58:35 -04:00
parent 3eb814ce51
commit a4a2b2f1de
2 changed files with 2 additions and 1 deletions

@ -2,6 +2,7 @@ DFHack Future
Internals
A method for caching screen output is now available to Lua (and C++)
Developer plugins can be ignored on startup by setting the DFHACK_NO_DEV_PLUGINS environment variable
The console on Linux and OS X now recognizes keyboard input between prompts
Lua
New internal commands
New plugins

@ -397,7 +397,7 @@ namespace DFHack
// We want read to return every single byte, without timeout.
raw.c_cc[VMIN] = 1; raw.c_cc[VTIME] = 0;// 1 byte, no timer
// put terminal in raw mode after flushing
if (tcsetattr(STDIN_FILENO,TCSAFLUSH,&raw) < 0)
if (tcsetattr(STDIN_FILENO,TCSADRAIN,&raw) < 0)
return -1;
rawmode = 1;
return 0;