mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
VideoConfig: Make StereoMode an enum class
Makes for more strongly-typed identifiers (and doesn't pollute surrounding namespaces)
This commit is contained in:
@ -146,7 +146,7 @@ void EnhancementsWidget::LoadSettings()
|
||||
|
||||
// Post Processing Shader
|
||||
std::vector<std::string> shaders =
|
||||
g_Config.iStereoMode == STEREO_ANAGLYPH ?
|
||||
g_Config.stereo_mode == StereoMode::Anaglyph ?
|
||||
PostProcessingShaderImplementation::GetAnaglyphShaderList(
|
||||
g_Config.backend_info.api_type) :
|
||||
PostProcessingShaderImplementation::GetShaderList(g_Config.backend_info.api_type);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user