Clear postprocess confusion in d3d9 backend by hiding the option:]

This commit is contained in:
LunaMoo 2017-12-01 10:02:31 +01:00
parent 58438b3c28
commit 3b98b37800
2 changed files with 22 additions and 14 deletions

View File

@ -256,11 +256,14 @@ void GameSettingsScreen::CreateViews() {
altSpeed->SetZeroLabel(gr->T("Unlimited"));
graphicsSettings->Add(new ItemHeader(gr->T("Features")));
I18NCategory *ps = GetI18NCategory("PostShaders");
postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&g_Config.sPostShaderName, gr->T("Postprocessing Shader"), ps->GetName()));
postProcChoice_->OnClick.Handle(this, &GameSettingsScreen::OnPostProcShader);
postProcEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
postProcChoice_->SetEnabledPtr(&postProcEnable_);
// Hide postprocess option on unsupported backends to avoid confusion.
if (g_Config.iGPUBackend != GPU_BACKEND_DIRECT3D9) {
I18NCategory *ps = GetI18NCategory("PostShaders");
postProcChoice_ = graphicsSettings->Add(new ChoiceWithValueDisplay(&g_Config.sPostShaderName, gr->T("Postprocessing Shader"), ps->GetName()));
postProcChoice_->OnClick.Handle(this, &GameSettingsScreen::OnPostProcShader);
postProcEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
postProcChoice_->SetEnabledPtr(&postProcEnable_);
}
#if !defined(MOBILE_DEVICE)
graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gr->T("FullScreen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange);

View File

@ -195,16 +195,21 @@ namespace MainWindow {
const char *translatedShaderName = nullptr;
availableShaders.clear();
for (auto i = info.begin(); i != info.end(); ++i) {
checkedStatus = MF_UNCHECKED;
availableShaders.push_back(i->section);
if (g_Config.sPostShaderName == i->section) {
checkedStatus = MF_CHECKED;
if (g_Config.iGPUBackend == GPU_BACKEND_DIRECT3D9) {
translatedShaderName = ps->T("Not available in Direct3D9 backend");
AppendMenu(shaderMenu, MF_STRING | MF_BYPOSITION | MF_GRAYED, item++, ConvertUTF8ToWString(translatedShaderName).c_str());
} else {
for (auto i = info.begin(); i != info.end(); ++i) {
checkedStatus = MF_UNCHECKED;
availableShaders.push_back(i->section);
if (g_Config.sPostShaderName == i->section) {
checkedStatus = MF_CHECKED;
}
translatedShaderName = ps->T(i->section.c_str());
AppendMenu(shaderMenu, MF_STRING | MF_BYPOSITION | checkedStatus, item++, ConvertUTF8ToWString(translatedShaderName).c_str());
}
translatedShaderName = ps->T(i->section.c_str());
AppendMenu(shaderMenu, MF_STRING | MF_BYPOSITION | checkedStatus, item++, ConvertUTF8ToWString(translatedShaderName).c_str());
}
menuShaderInfo = info;