MCPcopy Create free account
hub / github.com/defold/defold / EnableVirtualTerminalProcessing

Function EnableVirtualTerminalProcessing

engine/hid/src/test/test_app_hid.cpp:160–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158
159#if defined(_WIN32)
160static bool EnableVirtualTerminalProcessing()
161{
162 HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
163 if (stdout_handle == INVALID_HANDLE_VALUE)
164 return false;
165
166 DWORD mode = 0;
167 if (!GetConsoleMode(stdout_handle, &mode))
168 return false;
169
170 if (mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING)
171 return true;
172
173 return SetConsoleMode(stdout_handle, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING) != 0;
174}
175#endif
176
177static void SetLastEvent(EngineCtx* engine, const char* format, ...)

Callers 1

EngineCreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected