mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 23:52:41 +00:00
GUI: Fix crash in shader controls
This commit is contained in:
parent
a70b0a2541
commit
272f884419
@ -424,19 +424,21 @@ void OptionsDialog::build() {
|
||||
}
|
||||
|
||||
// Shader options
|
||||
enableShaderControls(g_system->hasFeature(OSystem::kFeatureShaders));
|
||||
if (_shader) {
|
||||
enableShaderControls(g_system->hasFeature(OSystem::kFeatureShaders));
|
||||
|
||||
if (g_system->hasFeature(OSystem::kFeatureShaders)) {
|
||||
Common::String shader(ConfMan.get("shader", _domain));
|
||||
if (ConfMan.isKeyTemporary("shader")) {
|
||||
_shader->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
|
||||
}
|
||||
if (shader.empty() || shader == "default" || !ConfMan.hasKey("shader", _domain)) {
|
||||
_shader->setLabel(_c("None", "shader"));
|
||||
_shaderClearButton->setEnabled(false);
|
||||
} else {
|
||||
_shader->setLabel(shader);
|
||||
_shaderClearButton->setEnabled(true);
|
||||
if (g_system->hasFeature(OSystem::kFeatureShaders)) {
|
||||
Common::String shader(ConfMan.get("shader", _domain));
|
||||
if (ConfMan.isKeyTemporary("shader")) {
|
||||
_shader->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
|
||||
}
|
||||
if (shader.empty() || shader == "default" || !ConfMan.hasKey("shader", _domain)) {
|
||||
_shader->setLabel(_c("None", "shader"));
|
||||
_shaderClearButton->setEnabled(false);
|
||||
} else {
|
||||
_shader->setLabel(shader);
|
||||
_shaderClearButton->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user