BASE: Filter out old graphics modes when passed to -g

Fix #12775
This commit is contained in:
Einar Johan Trøan Sømåen 2023-02-11 01:59:54 +01:00
parent b1b2e34184
commit 4a36b04c2f
No known key found for this signature in database
GPG key ID: 0DFF2FB496CF9F93
3 changed files with 36 additions and 5 deletions

View file

@ -1081,6 +1081,15 @@ static const LegacyGraphicsMode s_legacyGraphicsModes[] = {
{ "tv2x", "tv", 2 }
};
bool ScalerManager::isOldGraphicsSetting(const Common::String &gfxMode) {
for (uint i = 0; i < ARRAYSIZE(s_legacyGraphicsModes); ++i) {
if (gfxMode == s_legacyGraphicsModes[i].oldName) {
return true;
}
}
return false;
}
void ScalerManager::updateOldSettings() {
// Search for legacy gfx_mode and replace it
if (ConfMan.hasKey("gfx_mode")) {