MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / InitializeConsole

Function InitializeConsole

IntelPresentMon/SampleClient/Console.cpp:16–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14static bool gConsoleFirstCommit;
15
16bool InitializeConsole()
17{
18 gConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
19 if (gConsoleHandle == INVALID_HANDLE_VALUE) {
20 return false;
21 }
22
23 CONSOLE_SCREEN_BUFFER_INFO info = {};
24 if (GetConsoleScreenBufferInfo(gConsoleHandle, &info) == 0) {
25 return false;
26 }
27
28 gConsoleTop = info.dwCursorPosition.Y;
29 gConsoleWidth = info.srWindow.Right - info.srWindow.Left + 1;
30 gConsoleBufferHeight = info.dwSize.Y;
31 gConsoleWriteBufferIndex = 0;
32 gConsolePrevWriteBufferSize = 0;
33 gConsoleFirstCommit = true;
34
35 return true;
36}
37
38static void vConsolePrint(char const* format, va_list args)
39{

Callers 2

AddGpuMetricFunction · 0.70
DynamicQuerySampleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected