Fix resolutions reported by dxgi-info.exe on high DPI systems
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
/**
|
||||
* @file tools/dxgi.cpp
|
||||
* @brief todo
|
||||
* @brief Displays information about connected displays and GPUs
|
||||
*/
|
||||
#define WINVER 0x0A00
|
||||
#include <d3dcommon.h>
|
||||
#include <dxgi.h>
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user