mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
Add GraphicsDevice option and fix error in Config class to accept strings.
Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
This commit is contained in:
parent
06fa3f464e
commit
b34b4bde0f
3 changed files with 4 additions and 2 deletions
|
|
@ -1615,7 +1615,7 @@ bool Video::CreateHostDevice(const char *sdlVideoDriver)
|
||||||
g_interface = interfaceFunction();
|
g_interface = interfaceFunction();
|
||||||
if (g_interface != nullptr)
|
if (g_interface != nullptr)
|
||||||
{
|
{
|
||||||
g_device = g_interface->createDevice();
|
g_device = g_interface->createDevice(Config::GraphicsDevice);
|
||||||
if (g_device != nullptr)
|
if (g_device != nullptr)
|
||||||
{
|
{
|
||||||
#ifdef UNLEASHED_RECOMP_D3D12
|
#ifdef UNLEASHED_RECOMP_D3D12
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,7 @@ void ConfigDef<T, isHidden>::ReadValue(toml::v3::ex::parse_result& toml)
|
||||||
|
|
||||||
if constexpr (std::is_same<T, std::string>::value)
|
if constexpr (std::is_same<T, std::string>::value)
|
||||||
{
|
{
|
||||||
Value = section[Name].value_or<std::string>(DefaultValue);
|
Value = section[Name].value_or(DefaultValue);
|
||||||
}
|
}
|
||||||
else if constexpr (std::is_enum_v<T>)
|
else if constexpr (std::is_enum_v<T>)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ CONFIG_DEFINE_ENUM_LOCALISED("Audio", EChannelConfiguration, ChannelConfiguratio
|
||||||
CONFIG_DEFINE_LOCALISED("Audio", bool, MusicAttenuation, false);
|
CONFIG_DEFINE_LOCALISED("Audio", bool, MusicAttenuation, false);
|
||||||
CONFIG_DEFINE_LOCALISED("Audio", bool, BattleTheme, true);
|
CONFIG_DEFINE_LOCALISED("Audio", bool, BattleTheme, true);
|
||||||
|
|
||||||
|
CONFIG_DEFINE("Video", std::string, GraphicsDevice, "");
|
||||||
|
|
||||||
#ifdef UNLEASHED_RECOMP_D3D12
|
#ifdef UNLEASHED_RECOMP_D3D12
|
||||||
CONFIG_DEFINE_ENUM("Video", EGraphicsAPI, GraphicsAPI, EGraphicsAPI::D3D12);
|
CONFIG_DEFINE_ENUM("Video", EGraphicsAPI, GraphicsAPI, EGraphicsAPI::D3D12);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue