diff --git a/UnleashedRecomp/gpu/video.cpp b/UnleashedRecomp/gpu/video.cpp index ecc8d3ae..7073c865 100644 --- a/UnleashedRecomp/gpu/video.cpp +++ b/UnleashedRecomp/gpu/video.cpp @@ -1615,7 +1615,7 @@ bool Video::CreateHostDevice(const char *sdlVideoDriver) g_interface = interfaceFunction(); if (g_interface != nullptr) { - g_device = g_interface->createDevice(); + g_device = g_interface->createDevice(Config::GraphicsDevice); if (g_device != nullptr) { #ifdef UNLEASHED_RECOMP_D3D12 diff --git a/UnleashedRecomp/user/config.cpp b/UnleashedRecomp/user/config.cpp index 4aeafb9f..918c7b6d 100644 --- a/UnleashedRecomp/user/config.cpp +++ b/UnleashedRecomp/user/config.cpp @@ -472,7 +472,7 @@ void ConfigDef::ReadValue(toml::v3::ex::parse_result& toml) if constexpr (std::is_same::value) { - Value = section[Name].value_or(DefaultValue); + Value = section[Name].value_or(DefaultValue); } else if constexpr (std::is_enum_v) { diff --git a/UnleashedRecomp/user/config_def.h b/UnleashedRecomp/user/config_def.h index 611aff3e..a9720297 100644 --- a/UnleashedRecomp/user/config_def.h +++ b/UnleashedRecomp/user/config_def.h @@ -46,6 +46,8 @@ CONFIG_DEFINE_ENUM_LOCALISED("Audio", EChannelConfiguration, ChannelConfiguratio CONFIG_DEFINE_LOCALISED("Audio", bool, MusicAttenuation, false); CONFIG_DEFINE_LOCALISED("Audio", bool, BattleTheme, true); +CONFIG_DEFINE("Video", std::string, GraphicsDevice, ""); + #ifdef UNLEASHED_RECOMP_D3D12 CONFIG_DEFINE_ENUM("Video", EGraphicsAPI, GraphicsAPI, EGraphicsAPI::D3D12); #else