VideoConfig: Make StereoMode an enum class

Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
This commit is contained in:
Lioncash
2017-11-10 22:55:00 -05:00
parent 10697bcbe3
commit 5337e58284
25 changed files with 78 additions and 74 deletions

View File

@ -264,46 +264,46 @@ void HotkeyScheduler::Run()
// Stereoscopy
if (IsHotkey(HK_TOGGLE_STEREO_SBS) || IsHotkey(HK_TOGGLE_STEREO_TAB))
{
if (g_Config.iStereoMode != STEREO_SBS)
if (g_Config.stereo_mode != StereoMode::SBS)
{
// Disable post-processing shader, as stereoscopy itself is currently a shader
if (g_Config.sPostProcessingShader == DUBOIS_ALGORITHM_SHADER)
g_Config.sPostProcessingShader = "";
g_Config.iStereoMode = IsHotkey(HK_TOGGLE_STEREO_SBS) ? STEREO_SBS : STEREO_TAB;
g_Config.stereo_mode = IsHotkey(HK_TOGGLE_STEREO_SBS) ? StereoMode::SBS : StereoMode::TAB;
}
else
{
g_Config.iStereoMode = STEREO_OFF;
g_Config.stereo_mode = StereoMode::Off;
}
}
if (IsHotkey(HK_TOGGLE_STEREO_ANAGLYPH))
{
if (g_Config.iStereoMode != STEREO_ANAGLYPH)
if (g_Config.stereo_mode != StereoMode::Anaglyph)
{
g_Config.iStereoMode = STEREO_ANAGLYPH;
g_Config.stereo_mode = StereoMode::Anaglyph;
g_Config.sPostProcessingShader = DUBOIS_ALGORITHM_SHADER;
}
else
{
g_Config.iStereoMode = STEREO_OFF;
g_Config.stereo_mode = StereoMode::Off;
g_Config.sPostProcessingShader = "";
}
}
if (IsHotkey(HK_TOGGLE_STEREO_3DVISION))
{
if (g_Config.iStereoMode != STEREO_3DVISION)
if (g_Config.stereo_mode != StereoMode::Nvidia3DVision)
{
if (g_Config.sPostProcessingShader == DUBOIS_ALGORITHM_SHADER)
g_Config.sPostProcessingShader = "";
g_Config.iStereoMode = STEREO_3DVISION;
g_Config.stereo_mode = StereoMode::Nvidia3DVision;
}
else
{
g_Config.iStereoMode = STEREO_OFF;
g_Config.stereo_mode = StereoMode::Off;
}
}
}