]> git.sesse.net Git - stockfish/commit
Ignore non keyboard events in Bioskey()
authorMarco Costalba <mcostalba@gmail.com>
Thu, 18 Sep 2008 10:46:48 +0000 (11:46 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 18 Sep 2008 10:27:10 +0000 (12:27 +0200)
commit95ce27f9262b63ce8eb611965e5cbc16bae815ad
treea844080d060e18dbbe6b3d54de9e22b3d4637edc
parent5c4f6f6226c7b12bd737f10dba40b28f26f1b58d
Ignore non keyboard events in Bioskey()

Filter out mouse and windows type events.

This fix an issue where Glaurung hangs in console mode
under Windows.

To reproduce simply open a console under Windows (cmd.exe),
run "glaurung.exe bench 50 1", this starts benchmarking.
Then hide the windows and show again or clik the mouse
somewhere on the window, this hangs the benchmark
because Boiskey() returns true and poll() calls std::getline()
that hangs waiting for user pressing a return key.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/misc.cpp