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

View File

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