diff --git a/tools/dxgi.cpp b/tools/dxgi.cpp index d368848f..613c9eaa 100644 --- a/tools/dxgi.cpp +++ b/tools/dxgi.cpp @@ -1,7 +1,8 @@ /** * @file tools/dxgi.cpp - * @brief todo + * @brief Displays information about connected displays and GPUs */ +#define WINVER 0x0A00 #include #include @@ -27,6 +28,9 @@ int main(int argc, char *argv[]) { HRESULT status; + // Set ourselves as per-monitor DPI aware for accurate resolution values on High DPI systems + SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); + dxgi::factory1_t::pointer factory_p {}; status = CreateDXGIFactory1(IID_IDXGIFactory1, (void **) &factory_p); dxgi::factory1_t factory { factory_p };