I have a DPI Aware application(via manifest file) and on 1 monitor system all the the following methods are returning wrong desktop resolution:
- GetSystemMetrics
- GetMonitorInfo
- GetWindowRect(GetDesktopWindow(), &desktop)
- EnumDisplaySettingsExA/ENUM_CURRENT_SETTINGS
- IDXGIOutput::GetDesc
My monitor is 4k but I set desktop size to 1920x1080 with 100% scale. When in windowed mode the reported resolution via all the methods is correct. However when switched to full-screen they all return 1600x1200. If it was DPI Aware problem it should at least keep the aspect ratio, e.g. 1600x900.
I noticed that the wrong results are after a call to IDXGISwapChain::SetFullscreenState(true, output_device) where the swap chain object is created with the flag DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH as per MSDN.
The app is using DirectX 11.
Any suggestions what my cause this?
Thank you