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

Function GetConsoleWidth

PresentMon/CommandLine.cpp:137–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135CommandLineArgs gCommandLineArgs;
136
137size_t GetConsoleWidth()
138{
139 CONSOLE_SCREEN_BUFFER_INFO info = {};
140 return GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info) == 0
141 ? DEFAULT_CONSOLE_WIDTH
142 : std::max<size_t>(DEFAULT_CONSOLE_WIDTH, info.srWindow.Right - info.srWindow.Left + 1);
143}
144
145bool ParseKeyName(KeyNameCode const* valid, size_t validCount, wchar_t* name, wchar_t const* errorMessage, UINT* outKeyCode)
146{

Callers 2

ParseKeyNameFunction · 0.85
PrintUsageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected