mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Merge pull request #6186 from lioncash/enum-class
VideoConfig: Make AspectMode and StereoMode enum classes
This commit is contained in:
@ -1549,7 +1549,7 @@ void CFrame::ParseHotkeys()
|
||||
|
||||
if (IsHotkey(HK_TOGGLE_STEREO_SBS))
|
||||
{
|
||||
if (g_Config.iStereoMode != STEREO_SBS)
|
||||
if (g_Config.stereo_mode != StereoMode::SBS)
|
||||
{
|
||||
// Current implementation of anaglyph stereoscopy uses a
|
||||
// post-processing shader. Thus the shader needs to be to be
|
||||
@ -1558,56 +1558,56 @@ void CFrame::ParseHotkeys()
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
}
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_SBS));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::SBS));
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_OFF));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
|
||||
}
|
||||
}
|
||||
if (IsHotkey(HK_TOGGLE_STEREO_TAB))
|
||||
{
|
||||
if (g_Config.iStereoMode != STEREO_TAB)
|
||||
if (g_Config.stereo_mode != StereoMode::TAB)
|
||||
{
|
||||
if (g_Config.sPostProcessingShader == "dubois")
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
}
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_TAB));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::TAB));
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_OFF));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
|
||||
}
|
||||
}
|
||||
if (IsHotkey(HK_TOGGLE_STEREO_ANAGLYPH))
|
||||
{
|
||||
if (g_Config.iStereoMode != STEREO_ANAGLYPH)
|
||||
if (g_Config.stereo_mode != StereoMode::Anaglyph)
|
||||
{
|
||||
// Setting the anaglyph mode also requires a specific
|
||||
// post-processing shader to be activated.
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_ANAGLYPH));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Anaglyph));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_OFF));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
}
|
||||
}
|
||||
if (IsHotkey(HK_TOGGLE_STEREO_3DVISION))
|
||||
{
|
||||
if (g_Config.iStereoMode != STEREO_3DVISION)
|
||||
if (g_Config.stereo_mode != StereoMode::Nvidia3DVision)
|
||||
{
|
||||
if (g_Config.sPostProcessingShader == "dubois")
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
|
||||
}
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_3DVISION));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Nvidia3DVision));
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(STEREO_OFF));
|
||||
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1199,7 +1199,7 @@ void VideoConfigDiag::CreateDescriptionArea(wxPanel* const page, wxBoxSizer* con
|
||||
void VideoConfigDiag::PopulatePostProcessingShaders()
|
||||
{
|
||||
std::vector<std::string> shaders =
|
||||
vconfig.iStereoMode == STEREO_ANAGLYPH ?
|
||||
vconfig.stereo_mode == StereoMode::Anaglyph ?
|
||||
PostProcessingShaderImplementation::GetAnaglyphShaderList(vconfig.backend_info.api_type) :
|
||||
PostProcessingShaderImplementation::GetShaderList(vconfig.backend_info.api_type);
|
||||
|
||||
@ -1223,7 +1223,7 @@ void VideoConfigDiag::PopulatePostProcessingShaders()
|
||||
// Invalid shader, reset it to default
|
||||
choice_ppshader->Select(0);
|
||||
|
||||
if (vconfig.iStereoMode == STEREO_ANAGLYPH)
|
||||
if (vconfig.stereo_mode == StereoMode::Anaglyph)
|
||||
{
|
||||
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois"));
|
||||
choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader));
|
||||
|
Reference in New Issue
Block a user