mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 10:24:10 +01:00
[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.
This commit is contained in:
parent
05a96e96bb
commit
01061e43aa
@ -183,8 +183,6 @@ namespace dxvk {
|
|||||||
uint32_t srcModeId = 0;
|
uint32_t srcModeId = 0;
|
||||||
uint32_t dstModeId = 0;
|
uint32_t dstModeId = 0;
|
||||||
|
|
||||||
const bool includeStretchedModes = (Flags & DXGI_ENUM_MODES_SCALING);
|
|
||||||
|
|
||||||
while (::EnumDisplaySettingsW(monInfo.szDevice, srcModeId++, &devMode)) {
|
while (::EnumDisplaySettingsW(monInfo.szDevice, srcModeId++, &devMode)) {
|
||||||
// Skip interlaced modes altogether
|
// Skip interlaced modes altogether
|
||||||
if (devMode.dmDisplayFlags & DM_INTERLACED)
|
if (devMode.dmDisplayFlags & DM_INTERLACED)
|
||||||
@ -194,13 +192,6 @@ namespace dxvk {
|
|||||||
if (devMode.dmBitsPerPel != GetFormatBpp(EnumFormat))
|
if (devMode.dmBitsPerPel != GetFormatBpp(EnumFormat))
|
||||||
continue;
|
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
|
// Write back display mode
|
||||||
if (pDesc != nullptr) {
|
if (pDesc != nullptr) {
|
||||||
if (dstModeId >= *pNumModes)
|
if (dstModeId >= *pNumModes)
|
||||||
@ -212,9 +203,7 @@ namespace dxvk {
|
|||||||
mode.RefreshRate = { devMode.dmDisplayFrequency, 1 };
|
mode.RefreshRate = { devMode.dmDisplayFrequency, 1 };
|
||||||
mode.Format = EnumFormat;
|
mode.Format = EnumFormat;
|
||||||
mode.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE;
|
mode.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE;
|
||||||
mode.Scaling = isStretched
|
mode.Scaling = DXGI_MODE_SCALING_CENTERED;
|
||||||
? DXGI_MODE_SCALING_STRETCHED
|
|
||||||
: DXGI_MODE_SCALING_CENTERED;
|
|
||||||
|
|
||||||
pDesc[dstModeId] = mode;
|
pDesc[dstModeId] = mode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user