diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index 24e4a18f..7c0fa62c 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -8,6 +8,7 @@ #include "dxgi_enums.h" #include "dxgi_factory.h" #include "dxgi_format.h" +#include "dxgi_options.h" #include "dxgi_output.h" #include "../dxvk/vulkan/dxvk_vulkan_names.h" @@ -63,8 +64,9 @@ namespace dxvk { || InterfaceName == __uuidof(ID3D10Device1)) { Logger::warn("DXGI: CheckInterfaceSupport: No D3D10 support"); - if (env::getEnvVar(L"DXVK_FAKE_DX10_SUPPORT") == "1") - return S_OK; + DxgiOptions dxgiOptions = getDxgiAppOptions(env::getExeName()); + return dxgiOptions.test(DxgiOption::FakeDx10Support) + ? S_OK : DXGI_ERROR_UNSUPPORTED; } Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface"); diff --git a/src/dxgi/dxgi_include.h b/src/dxgi/dxgi_include.h index bef395af..28b92987 100644 --- a/src/dxgi/dxgi_include.h +++ b/src/dxgi/dxgi_include.h @@ -17,6 +17,7 @@ #include "../util/rc/util_rc.h" #include "../util/rc/util_rc_ptr.h" +#include "../util/util_env.h" #include "../util/util_enum.h" #include "../util/util_error.h" #include "../util/util_flags.h" diff --git a/src/dxgi/dxgi_options.cpp b/src/dxgi/dxgi_options.cpp index 94df5f80..3644e74e 100644 --- a/src/dxgi/dxgi_options.cpp +++ b/src/dxgi/dxgi_options.cpp @@ -6,15 +6,21 @@ namespace dxvk { const static std::unordered_map g_dxgiAppOptions = {{ { "Frostpunk.exe", DxgiOptions(DxgiOption::DeferSurfaceCreation) }, + { "Wow.exe", DxgiOptions(DxgiOption::FakeDx10Support) }, }}; DxgiOptions getDxgiAppOptions(const std::string& appName) { + DxgiOptions options; + auto appOptions = g_dxgiAppOptions.find(appName); + if (appOptions != g_dxgiAppOptions.end()) + options = appOptions->second; - return appOptions != g_dxgiAppOptions.end() - ? appOptions->second - : DxgiOptions(); + if (env::getEnvVar(L"DXVK_FAKE_DX10_SUPPORT") == "1") + options.set(DxgiOption::FakeDx10Support); + + return options; } } \ No newline at end of file diff --git a/src/dxgi/dxgi_options.h b/src/dxgi/dxgi_options.h index 11c8c999..d6376b1e 100644 --- a/src/dxgi/dxgi_options.h +++ b/src/dxgi/dxgi_options.h @@ -15,6 +15,11 @@ namespace dxvk { /// fixes issues with games that create multiple swap chains /// for a single window that may interfere with each other. DeferSurfaceCreation, + + /// Report to the app that Dx10 interfaces are supported, + /// even if they are not actually supported. Some apps + /// refuse to start without it, some don't work with it. + FakeDx10Support, }; using DxgiOptions = Flags;