1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-20 17:52:11 +01:00
dxvk/src/dxgi/dxgi_options.cpp

26 lines
679 B
C++
Raw Normal View History

2018-05-24 12:31:04 +02:00
#include "dxgi_options.h"
#include <unordered_map>
namespace dxvk {
const static std::unordered_map<std::string, DxgiOptions> g_dxgiAppOptions = {{
{ "Frostpunk.exe", DxgiOptions(DxgiOption::DeferSurfaceCreation) },
{ "Wow.exe", DxgiOptions(DxgiOption::FakeDx10Support) },
2018-05-24 12:31:04 +02:00
}};
DxgiOptions getDxgiAppOptions(const std::string& appName) {
DxgiOptions options;
2018-05-24 12:31:04 +02:00
auto appOptions = g_dxgiAppOptions.find(appName);
if (appOptions != g_dxgiAppOptions.end())
options = appOptions->second;
if (env::getEnvVar(L"DXVK_FAKE_DX10_SUPPORT") == "1")
options.set(DxgiOption::FakeDx10Support);
2018-05-24 12:31:04 +02:00
return options;
2018-05-24 12:31:04 +02:00
}
}