GUI: Fix setting the soundfont in ConfMan

This fixes bug #13531.
The issue was a regression introduced in commit 7dd0c1ddf8.
This commit is contained in:
Thierry Crozat 2022-06-02 20:07:49 +01:00
parent fac74a6b11
commit 7ff1533799

View File

@ -908,8 +908,8 @@ void OptionsDialog::apply() {
Common::U32String soundFont(_soundFont->getLabel());
if (soundFont != ConfMan.get("soundfont", _domain)) {
_soundFont->setFontColor(ThemeEngine::FontColor::kFontColorNormal);
if (soundFont.empty() || (soundFont != _c("None", "soundfont")))
ConfMan.removeKey("soundpath", _domain);
if (soundFont.empty() || (soundFont == _c("None", "soundfont")))
ConfMan.removeKey("soundfont", _domain);
else
ConfMan.set("soundfont", soundFont.encode(), _domain);
}