mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Config: Fix template deduction for implicit conversions
This excludes the second argument from template deduction. Otherwise, it is required to manually cast the second argument to the ConfigInfo type (because implicit conversions won't work). e.g. to set the value for a ConfigInfo<std::string> from a string literal, you'd need a ugly `std::string("yourstring")`.
This commit is contained in:
@ -348,7 +348,7 @@ void HotkeyScheduler::Run()
|
||||
{
|
||||
// Disable post-processing shader, as stereoscopy itself is currently a shader
|
||||
if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) == DUBOIS_ALGORITHM_SHADER)
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
|
||||
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, IsHotkey(HK_TOGGLE_STEREO_SBS) ?
|
||||
static_cast<int>(StereoMode::SBS) :
|
||||
@ -365,12 +365,12 @@ void HotkeyScheduler::Run()
|
||||
if (Config::Get(Config::GFX_STEREO_MODE) != static_cast<int>(StereoMode::Anaglyph))
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Anaglyph));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(DUBOIS_ALGORITHM_SHADER));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, DUBOIS_ALGORITHM_SHADER);
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
|
||||
}
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ void HotkeyScheduler::Run()
|
||||
if (Config::Get(Config::GFX_STEREO_MODE) != static_cast<int>(StereoMode::Nvidia3DVision))
|
||||
{
|
||||
if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) == DUBOIS_ALGORITHM_SHADER)
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
|
||||
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Nvidia3DVision));
|
||||
}
|
||||
|
Reference in New Issue
Block a user