diff options
-rw-r--r-- | contrib/epee/include/console_handler.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/epee/include/console_handler.h b/contrib/epee/include/console_handler.h index 95b986ff5..2ad92b3f2 100644 --- a/contrib/epee/include/console_handler.h +++ b/contrib/epee/include/console_handler.h @@ -155,6 +155,20 @@ namespace epee else if (0 < retval) return true; } +#else + while (m_run.load(std::memory_order_relaxed)) + { + int retval = ::WaitForSingleObject(::GetStdHandle(STD_INPUT_HANDLE), 100); + switch (retval) + { + case WAIT_FAILED: + return false; + case WAIT_OBJECT_0: + return true; + default: + break; + } + } #endif return true; |