summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-05 15:23:54 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-05 15:23:54 +0200
commit040380321c308c288f89e58d508c05ea17bbd4e2 (patch)
tree9e91667113f7746a8d52a80b77d16911526f27bd /src
parentReformat messages in NonCtrlHandler (diff)
downloadcuberite-040380321c308c288f89e58d508c05ea17bbd4e2.tar
cuberite-040380321c308c288f89e58d508c05ea17bbd4e2.tar.gz
cuberite-040380321c308c288f89e58d508c05ea17bbd4e2.tar.bz2
cuberite-040380321c308c288f89e58d508c05ea17bbd4e2.tar.lz
cuberite-040380321c308c288f89e58d508c05ea17bbd4e2.tar.xz
cuberite-040380321c308c288f89e58d508c05ea17bbd4e2.tar.zst
cuberite-040380321c308c288f89e58d508c05ea17bbd4e2.zip
Diffstat (limited to 'src')
-rw-r--r--src/Root.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 4291c5779..b90a229c9 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -1011,10 +1011,6 @@ void cRoot::TransitionNextState(NextState a_NextState)
s_StopEvent.Set();
#ifdef WIN32
- if (g_RunAsService)
- {
- return;
- }
DWORD Length;
INPUT_RECORD Record
@@ -1034,7 +1030,7 @@ void cRoot::TransitionNextState(NextState a_NextState)
// Can't kill the input thread since it breaks cin (getline doesn't block / receive input on restart)
// Apparently no way to unblock getline apart from CancelIoEx, but xoft wants Windows XP support
- // Only thing I can think of for now.
- VERIFY(WriteConsoleInput(GetStdHandle(STD_INPUT_HANDLE), &Record, 1, &Length) == TRUE);
+ // Only thing I can think of for now. Also, ignore the retval since sometimes there's no cin.
+ WriteConsoleInput(GetStdHandle(STD_INPUT_HANDLE), &Record, 1, &Length);
#endif
}