mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Merge pull request #6186 from lioncash/enum-class
VideoConfig: Make AspectMode and StereoMode enum classes
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);
|
||||
|
@ -221,7 +221,10 @@ void HotkeyScheduler::Run()
|
||||
if (IsHotkey(HK_TOGGLE_CROP))
|
||||
g_Config.bCrop = !g_Config.bCrop;
|
||||
if (IsHotkey(HK_TOGGLE_AR))
|
||||
g_Config.iAspectRatio = (g_Config.iAspectRatio + 1) & 3;
|
||||
{
|
||||
g_Config.aspect_mode =
|
||||
static_cast<AspectMode>((static_cast<int>(g_Config.aspect_mode) + 1) & 3);
|
||||
}
|
||||
if (IsHotkey(HK_TOGGLE_EFBCOPIES))
|
||||
g_Config.bSkipEFBCopyToRam = !g_Config.bSkipEFBCopyToRam;
|
||||
if (IsHotkey(HK_TOGGLE_XFBCOPIES))
|
||||
@ -261,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