Commit 74239e70 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Replace ultrawide option with one to force aspect ratio

parent a91904c2
......@@ -762,6 +762,8 @@ namespace dxvk {
uint32_t modeIndex = 0;
const auto forcedRatio = Ratio<DWORD>(options.forceAspectRatio);
while (::EnumDisplaySettingsW(monInfo.szDevice, modeIndex++, &devMode)) {
// Skip interlaced modes altogether
if (devMode.dmDisplayFlags & DM_INTERLACED)
......@@ -771,7 +773,7 @@ namespace dxvk {
if (devMode.dmBitsPerPel != GetMonitorFormatBpp(Format))
continue;
if (options.disableUltraWide && Ratio<DWORD>(devMode.dmPelsWidth, devMode.dmPelsHeight) == Ratio<DWORD>(64, 27))
if (!forcedRatio.undefined() && Ratio<DWORD>(devMode.dmPelsWidth, devMode.dmPelsHeight) != forcedRatio)
continue;
D3DDISPLAYMODEEX mode;
......
......@@ -59,7 +59,8 @@ namespace dxvk {
this->invariantPosition = config.getOption<bool> ("d3d9.invariantPosition", false);
this->memoryTrackTest = config.getOption<bool> ("d3d9.memoryTrackTest", false);
this->supportVCache = config.getOption<bool> ("d3d9.supportVCache", vendorId == 0x10de);
this->disableUltraWide = config.getOption<bool> ("d3d9.disableUltraWide", false);
this->forceAspectRatio = config.getOption<std::string>("d3d9.forceAspectRatio", "");
// If we are not Nvidia, enable general hazards.
this->generalHazards = adapter == nullptr || !adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);
......
......@@ -104,8 +104,8 @@ namespace dxvk {
/// Support VCACHE query
bool supportVCache;
/// Disable UltraWide (64:27) modes
bool disableUltraWide;
/// Forced aspect ratio, disable other modes
std::string forceAspectRatio;
};
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment