MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / DisableDpiAwareness

Function DisableDpiAwareness

TombEngine/Specific/winmain.cpp:174–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void DisableDpiAwareness()
175{
176 // Don't use SHCore library directly, as it's not available on pre-win 8.1 systems.
177
178 typedef HRESULT(WINAPI* SetDpiAwarenessProc)(UINT);
179 static constexpr unsigned int PROCESS_SYSTEM_DPI_AWARE = 1;
180
181 auto lib = LoadLibrary("SHCore.dll");
182 if (lib == NULL)
183 return;
184
185 auto setDpiAwareness = (SetDpiAwarenessProc)GetProcAddress(lib, "SetProcessDpiAwareness");
186 if (setDpiAwareness == NULL)
187 return;
188
189 setDpiAwareness(PROCESS_SYSTEM_DPI_AWARE);
190 FreeLibrary(lib);
191}
192
193bool GenerateDummyLevel(const std::string& levelPath)
194{

Callers 1

WinMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected