Commit 6bfb190f authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Implement d3d9.disableUltraWide

parent 8ddb3fac
......@@ -7,6 +7,7 @@
#include "../util/util_bit.h"
#include "../util/util_luid.h"
#include "../util/util_ratio.h"
#include <cfloat>
......@@ -752,6 +753,8 @@ namespace dxvk {
if (!IsSupportedAdapterFormat(Format) || !IsSupportedDisplayFormat(Format, false))
return;
auto& options = m_parent->GetOptions();
// Walk over all modes that the display supports and
// return those that match the requested format etc.
DEVMODEW devMode = { };
......@@ -768,6 +771,9 @@ namespace dxvk {
if (devMode.dmBitsPerPel != GetMonitorFormatBpp(Format))
continue;
if (options.disableUltraWide && Ratio<DWORD>(devMode.dmPelsWidth, devMode.dmPelsHeight) == Ratio<DWORD>(64, 27))
continue;
D3DDISPLAYMODEEX mode;
mode.Size = sizeof(D3DDISPLAYMODEEX);
mode.Width = devMode.dmPelsWidth;
......
......@@ -59,6 +59,7 @@ 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);
// If we are not Nvidia, enable general hazards.
this->generalHazards = adapter == nullptr || !adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);
......
......@@ -103,6 +103,9 @@ namespace dxvk {
/// Support VCACHE query
bool supportVCache;
/// Disable UltraWide (64:27) modes
bool disableUltraWide;
};
}
\ 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