MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CheckForConsoleInput

Function CheckForConsoleInput

src/video/dedicated_v.cpp:56–66  ·  view source on GitHub ↗

Windows Console thread. Just loop and signal when input has been received */

Source from the content-addressed store, hash-verified

54
55/* Windows Console thread. Just loop and signal when input has been received */
56static void WINAPI CheckForConsoleInput()
57{
58 SetCurrentThreadName("ottd:win-console");
59
60 for (;;) {
61 std::getline(std::cin, _win_console_thread_buffer);
62
63 /* Signal input waiting that input is read and wait for it being handled. */
64 SignalObjectAndWait(_hInputReady, _hWaitForInputHandling, INFINITE, FALSE);
65 }
66}
67
68static void CreateWindowsConsoleThread()
69{

Callers

nothing calls this directly

Calls 1

SetCurrentThreadNameFunction · 0.50

Tested by

no test coverage detected