From 01061e43aa11d6e22ca741195eb3d868eaaded76 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 18 Apr 2018 15:03:12 +0200 Subject: [PATCH] [dxgi] GetDisplayModeList: Do not report modes as stretched This is more in line with what Windows does. Games should now be able to list more than just the monitor's maximum resolution again. --- src/dxgi/dxgi_output.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/dxgi/dxgi_output.cpp b/src/dxgi/dxgi_output.cpp index 0abc465a..6da7a320 100644 --- a/src/dxgi/dxgi_output.cpp +++ b/src/dxgi/dxgi_output.cpp @@ -183,8 +183,6 @@ namespace dxvk { uint32_t srcModeId = 0; uint32_t dstModeId = 0; - const bool includeStretchedModes = (Flags & DXGI_ENUM_MODES_SCALING); - while (::EnumDisplaySettingsW(monInfo.szDevice, srcModeId++, &devMode)) { // Skip interlaced modes altogether if (devMode.dmDisplayFlags & DM_INTERLACED) @@ -194,13 +192,6 @@ namespace dxvk { if (devMode.dmBitsPerPel != GetFormatBpp(EnumFormat)) continue; - // Skip stretched modes unless they are requested - const bool isStretched = devMode.dmPelsWidth != UINT(monInfo.rcMonitor.right - monInfo.rcMonitor.left) - || devMode.dmPelsHeight != UINT(monInfo.rcMonitor.bottom - monInfo.rcMonitor.top); - - if (isStretched && !includeStretchedModes) - continue; - // Write back display mode if (pDesc != nullptr) { if (dstModeId >= *pNumModes) @@ -212,9 +203,7 @@ namespace dxvk { mode.RefreshRate = { devMode.dmDisplayFrequency, 1 }; mode.Format = EnumFormat; mode.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE; - mode.Scaling = isStretched - ? DXGI_MODE_SCALING_STRETCHED - : DXGI_MODE_SCALING_CENTERED; + mode.Scaling = DXGI_MODE_SCALING_CENTERED; pDesc[dstModeId] = mode; }