Qt/HotkeyScheduler: Fix 3D Mode hotkeys not behaving properly

This commit is contained in:
spycrab 2018-06-16 21:38:14 +02:00
parent b5e6cd9725
commit e3f7b0274c

View File

@ -348,7 +348,7 @@ void HotkeyScheduler::Run()
emit StateLoadSlotHotkey(); emit StateLoadSlotHotkey();
// Stereoscopy // Stereoscopy
if (IsHotkey(HK_TOGGLE_STEREO_SBS) || IsHotkey(HK_TOGGLE_STEREO_TAB)) if (IsHotkey(HK_TOGGLE_STEREO_SBS))
{ {
if (Config::Get(Config::GFX_STEREO_MODE) != StereoMode::SBS) if (Config::Get(Config::GFX_STEREO_MODE) != StereoMode::SBS)
{ {
@ -356,8 +356,23 @@ void HotkeyScheduler::Run()
if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) == DUBOIS_ALGORITHM_SHADER) if (Config::Get(Config::GFX_ENHANCE_POST_SHADER) == DUBOIS_ALGORITHM_SHADER)
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, ""); Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
Config::SetCurrent(Config::GFX_STEREO_MODE, Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::SBS);
IsHotkey(HK_TOGGLE_STEREO_SBS) ? StereoMode::SBS : StereoMode::TAB); }
else
{
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Off);
}
}
if (IsHotkey(HK_TOGGLE_STEREO_TAB))
{
if (Config::Get(Config::GFX_STEREO_MODE) != StereoMode::TAB)
{
// 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, "");
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::TAB);
} }
else else
{ {