X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;h=d18f48d6e8a7c24a1c4eb7c679cb770e8af4717b;hp=0a1879b2bef2dc94da039dc1ed791288b74a0c40;hb=4fa0395eb8db33b23c2a91e4b255021fd940d811;hpb=096351d1f53fe98f86cf2b4678f696b9cd8ddebd diff --git a/src/misc.cpp b/src/misc.cpp index 0a1879b2..d18f48d6 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -58,7 +58,7 @@ using namespace std; /// Version number. If this is left empty, the current date (in the format /// YYMMDD) is used as a version number. -static const string EngineVersion = "2.0.1"; +static const string EngineVersion = ""; static const string AppName = "Stockfish"; static const string AppTag = ""; @@ -228,19 +228,19 @@ int data_available() int data_available() { static HANDLE inh = NULL; - static bool usePipe; + static bool usePipe = false; INPUT_RECORD rec[256]; DWORD dw, recCnt; if (!inh) { inh = GetStdHandle(STD_INPUT_HANDLE); - usePipe = !GetConsoleMode(inh, &dw); - if (!usePipe) + if (GetConsoleMode(inh, &dw)) { SetConsoleMode(inh, dw & ~(ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT)); FlushConsoleInputBuffer(inh); - } + } else + usePipe = true; } // If we're running under XBoard then we can't use PeekConsoleInput() as