summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Frame.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2015-12-02 15:24:59 +0100
committerMarkus Wick <degasus@users.noreply.github.com>2015-12-02 15:24:59 +0100
commitabbc25f662e28d71307dae40a7278c6004eb3d56 (patch)
tree7f490f8cfc7f8eaab8a3cca77a68aea769ec7340 /Source/Core/DolphinWX/Frame.cpp
parent3ed29cce0cbc60220bdd47a21c4739baa8d16f11 (diff)
parent6b9f4f511519e43a066522df45402f323ab0643b (diff)
Merge pull request #2788 from TurboK234/3d_hotkeys
Added hotkeys for toggling different stereoscopy modes
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index 83fb8b10f6..eb775534ba 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -1418,6 +1418,70 @@ void CFrame::ParseHotkeys()
State::Load(g_saveSlot);
}
+ if (IsHotkey(HK_TOGGLE_STEREO_SBS))
+ {
+ if (g_Config.iStereoMode != STEREO_SBS)
+ {
+ // Current implementation of anaglyph stereoscopy uses a
+ // post-processing shader. Thus the shader needs to be to be
+ // turned off when selecting other stereoscopy modes.
+ if (g_Config.sPostProcessingShader == "dubois")
+ {
+ g_Config.sPostProcessingShader = "";
+ }
+ g_Config.iStereoMode = STEREO_SBS;
+ }
+ else
+ {
+ g_Config.iStereoMode = STEREO_OFF;
+ }
+ }
+ if (IsHotkey(HK_TOGGLE_STEREO_TAB))
+ {
+ if (g_Config.iStereoMode != STEREO_TAB)
+ {
+ if (g_Config.sPostProcessingShader == "dubois")
+ {
+ g_Config.sPostProcessingShader = "";
+ }
+ g_Config.iStereoMode = STEREO_TAB;
+ }
+ else
+ {
+ g_Config.iStereoMode = STEREO_OFF;
+ }
+ }
+ if (IsHotkey(HK_TOGGLE_STEREO_ANAGLYPH))
+ {
+ if (g_Config.iStereoMode != STEREO_ANAGLYPH)
+ {
+ // Setting the anaglyph mode also requires a specific
+ // post-processing shader to be activated.
+ g_Config.iStereoMode = STEREO_ANAGLYPH;
+ g_Config.sPostProcessingShader = "dubois";
+ }
+ else
+ {
+ g_Config.iStereoMode = STEREO_OFF;
+ g_Config.sPostProcessingShader = "";
+ }
+ }
+ if (IsHotkey(HK_TOGGLE_STEREO_3DVISION))
+ {
+ if (g_Config.iStereoMode != STEREO_3DVISION)
+ {
+ if (g_Config.sPostProcessingShader == "dubois")
+ {
+ g_Config.sPostProcessingShader = "";
+ }
+ g_Config.iStereoMode = STEREO_3DVISION;
+ }
+ else
+ {
+ g_Config.iStereoMode = STEREO_OFF;
+ }
+ }
+
auto savePreset = [](const std::string& param, int value)
{
IniFile localIni = SConfig::GetInstance().LoadLocalGameIni();