Merge pull request #7126 from spycrab/qt_3dhotkeys

Qt/HotkeyScheduler: Fix 3D Mode hotkeys not behaving properly
This commit is contained in:
spycrab 2018-06-17 19:59:13 +02:00 committed by GitHub
commit 6bfbc1988e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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