From b29b5acc0a2b0ebf7dd9a91ffeafbc65acda241d Mon Sep 17 00:00:00 2001 From: athrxx Date: Sun, 15 May 2022 18:43:49 +0200 Subject: [PATCH] COMMON: (MASS ADD) - fix language code comparison for obsolete lang codes We now correctly recognize obsolete language codes. (e. g. "jp" will be considered the same as "ja") Another step to bring down the number of detected targets... --- gui/massadd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 51b1e5f5e20..018c96bee7e 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -208,11 +208,11 @@ void MassAddDialog::handleTickle() { // If the engineid, gameid, platform and language match -> skip it Common::ConfigManager::Domain *dom = ConfMan.getDomain(*iter); assert(dom); - + if ((*dom)["engineid"] == result.engineId && (*dom)["gameid"] == result.gameId && dom->getValOrDefault("platform") == resultPlatformCode && - dom->getValOrDefault("language") == resultLanguageCode) { + parseLanguage(dom->getValOrDefault("language")) == parseLanguage(resultLanguageCode)) { duplicate = true; break; }