@@ -1441,9 +1441,9 @@ void CFrame::ParseHotkeys()
{
show_msg(OSDMessage::ARToggled);
// Toggle aspect ratio
int aspect_ratio = Config::Get(Config::GFX_ASPECT_RATIO);
int aspect_ratio = static_cast<int>(Config::Get(Config::GFX_ASPECT_RATIO));
aspect_ratio = (aspect_ratio + 1) & 3;
Config::SetCurrent(Config::GFX_ASPECT_RATIO, aspect_ratio);
Config::SetCurrent(Config::GFX_ASPECT_RATIO, static_cast<AspectMode>(aspect_ratio));
}
if (IsHotkey(HK_TOGGLE_EFBCOPIES))
{
@@ -1524,13 +1524,13 @@ void CFrame::ParseHotkeys()
// turned off when selecting other stereoscopy modes.
if (g_Config.sPostProcessingShader == "dubois")
{
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
}
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::SBS));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::SBS);
}
else
{
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Off);
}
}
if (IsHotkey(HK_TOGGLE_STEREO_TAB))
@@ -1539,13 +1539,13 @@ void CFrame::ParseHotkeys()
{
if (g_Config.sPostProcessingShader == "dubois")
{
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
}
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::TAB));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::TAB);
}
else
{
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Off);
}
}
if (IsHotkey(HK_TOGGLE_STEREO_ANAGLYPH))
@@ -1554,13 +1554,13 @@ void CFrame::ParseHotkeys()
{
// Setting the anaglyph mode also requires a specific
// post-processing shader to be activated.
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Anaglyph));
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois"));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Anaglyph);
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "dubois");
}
else
{
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Off);
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
}
}
if (IsHotkey(HK_TOGGLE_STEREO_3DVISION))
@@ -1569,13 +1569,13 @@ void CFrame::ParseHotkeys()
{
if (g_Config.sPostProcessingShader == "dubois")
{
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
}
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Nvidia3DVision));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Nvidia3DVision);
}
else
{
Config::SetCurrent(Config::GFX_STEREO_MODE, static_cast<int>(StereoMode::Off));
Config::SetCurrent(Config::GFX_STEREO_MODE, StereoMode::Off);
}
}

@@ -465,7 +465,8 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string& title)
{
szr_shader_compilation->Add(
CreateRadioButton(page_general, modes[i].first, modes[i].second,
Config::GFX_SHADER_COMPILATION_MODE, static_cast<int>(i)),
Config::GFX_SHADER_COMPILATION_MODE,
static_cast<ShaderCompilationMode>(i)),
wxGBPosition(static_cast<int>(i / 2), static_cast<int>(i % 2)), wxDefaultSpan,
wxALIGN_CENTER_VERTICAL);
}
@@ -1233,11 +1234,11 @@ void VideoConfigDiag::PopulatePostProcessingShaders()

if (vconfig.stereo_mode == StereoMode::Anaglyph)
{
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string("dubois"));
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, "dubois");
choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader));
}
else
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
Config::SetBaseOrCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
}

// Should the configuration button be loaded by default?
@@ -141,7 +141,7 @@ void OpenGLPostProcessing::ApplyShader()
if (!ProgramShaderCache::CompileShader(m_shader, s_vertex_shader, code))
{
ERROR_LOG(VIDEO, "Failed to compile post-processing shader %s", m_config.GetShader().c_str());
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, std::string(""));
Config::SetCurrent(Config::GFX_ENHANCE_POST_SHADER, "");
code = m_config.LoadShader();
ProgramShaderCache::CompileShader(m_shader, s_vertex_shader, code);
}
@@ -60,9 +60,9 @@ void VideoConfig::Refresh()
iAdapter = Config::Get(Config::GFX_ADAPTER);

bWidescreenHack = Config::Get(Config::GFX_WIDESCREEN_HACK);
const auto config_aspect_mode = static_cast<AspectMode>(Config::Get(Config::GFX_ASPECT_RATIO));
const AspectMode config_aspect_mode = Config::Get(Config::GFX_ASPECT_RATIO);
if (config_aspect_mode == AspectMode::Auto)
aspect_mode = static_cast<AspectMode>(Config::Get(Config::GFX_SUGGESTED_ASPECT_RATIO));
aspect_mode = Config::Get(Config::GFX_SUGGESTED_ASPECT_RATIO);
else
aspect_mode = config_aspect_mode;
bCrop = Config::Get(Config::GFX_CROP);
@@ -103,8 +103,7 @@ void VideoConfig::Refresh()
iCommandBufferExecuteInterval = Config::Get(Config::GFX_COMMAND_BUFFER_EXECUTE_INTERVAL);
bShaderCache = Config::Get(Config::GFX_SHADER_CACHE);
bWaitForShadersBeforeStarting = Config::Get(Config::GFX_WAIT_FOR_SHADERS_BEFORE_STARTING);
iShaderCompilationMode =
static_cast<ShaderCompilationMode>(Config::Get(Config::GFX_SHADER_COMPILATION_MODE));
iShaderCompilationMode = Config::Get(Config::GFX_SHADER_COMPILATION_MODE);
iShaderCompilerThreads = Config::Get(Config::GFX_SHADER_COMPILER_THREADS);
iShaderPrecompilerThreads = Config::Get(Config::GFX_SHADER_PRECOMPILER_THREADS);

@@ -122,7 +121,7 @@ void VideoConfig::Refresh()
bForceTrueColor = Config::Get(Config::GFX_ENHANCE_FORCE_TRUE_COLOR);
bDisableCopyFilter = Config::Get(Config::GFX_ENHANCE_DISABLE_COPY_FILTER);

stereo_mode = static_cast<StereoMode>(Config::Get(Config::GFX_STEREO_MODE));
stereo_mode = Config::Get(Config::GFX_STEREO_MODE);
iStereoDepth = Config::Get(Config::GFX_STEREO_DEPTH);
iStereoConvergencePercentage = Config::Get(Config::GFX_STEREO_CONVERGENCE_PERCENTAGE);
bStereoSwapEyes = Config::Get(Config::GFX_STEREO_SWAP_EYES);