VideoConfigDiag: Allow anaglyph shader to be turned off.

Also hard-code the default shader.
This commit is contained in:
Jules Blok 2015-01-25 22:27:17 +01:00
parent 262c3b19ec
commit fc46d460f9
2 changed files with 6 additions and 4 deletions

View File

@ -739,8 +739,7 @@ void VideoConfigDiag::PopulatePostProcessingShaders()
if (shaders.empty()) if (shaders.empty())
return; return;
if (vconfig.iStereoMode != STEREO_ANAGLYPH) choice_ppshader->AppendString(_("(off)"));
choice_ppshader->AppendString(_("(off)"));
for (const std::string& shader : shaders) for (const std::string& shader : shaders)
{ {
@ -753,7 +752,10 @@ void VideoConfigDiag::PopulatePostProcessingShaders()
choice_ppshader->Select(0); choice_ppshader->Select(0);
if (vconfig.iStereoMode == STEREO_ANAGLYPH) if (vconfig.iStereoMode == STEREO_ANAGLYPH)
vconfig.sPostProcessingShader = shaders[0]; {
vconfig.sPostProcessingShader = "dubois";
choice_ppshader->SetStringSelection(StrToWxStr(vconfig.sPostProcessingShader));
}
else else
vconfig.sPostProcessingShader.clear(); vconfig.sPostProcessingShader.clear();
} }

View File

@ -144,7 +144,7 @@ protected:
void Event_PPShader(wxCommandEvent &ev) void Event_PPShader(wxCommandEvent &ev)
{ {
const int sel = ev.GetInt(); const int sel = ev.GetInt();
if (sel || vconfig.iStereoMode == STEREO_ANAGLYPH) if (sel)
vconfig.sPostProcessingShader = WxStrToStr(ev.GetString()); vconfig.sPostProcessingShader = WxStrToStr(ev.GetString());
else else
vconfig.sPostProcessingShader.clear(); vconfig.sPostProcessingShader.clear();