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

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
{ {