]> git.sesse.net Git - stockfish/commitdiff
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)
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>

No differences found