mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Added a menu option to retain extra MAME name information for unscraped game names.
This commit is contained in:
parent
47277f94b6
commit
ed94a5b45b
|
@ -1523,6 +1523,19 @@ void GuiMenu::openOtherOptions()
|
|||
}
|
||||
});
|
||||
|
||||
// Strip extra MAME name info.
|
||||
auto mameNameStripExtraInfo = std::make_shared<SwitchComponent>();
|
||||
mameNameStripExtraInfo->setState(Settings::getInstance()->getBool("MAMENameStripExtraInfo"));
|
||||
s->addWithLabel("STRIP EXTRA MAME NAME INFO (REQUIRES RESTART)", mameNameStripExtraInfo);
|
||||
s->addSaveFunc([mameNameStripExtraInfo, s] {
|
||||
if (Settings::getInstance()->getBool("MAMENameStripExtraInfo") !=
|
||||
mameNameStripExtraInfo->getState()) {
|
||||
Settings::getInstance()->setBool("MAMENameStripExtraInfo",
|
||||
mameNameStripExtraInfo->getState());
|
||||
s->setNeedsSaving();
|
||||
}
|
||||
});
|
||||
|
||||
#if defined(__unix__)
|
||||
// Whether to disable desktop composition.
|
||||
auto disableComposition = std::make_shared<SwitchComponent>();
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#ifndef ES_CORE_MAMENAMES_H
|
||||
#define ES_CORE_MAMENAMES_H
|
||||
|
||||
#include "Settings.h"
|
||||
#include "utils/StringUtil.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -36,7 +37,11 @@ public:
|
|||
|
||||
std::string getCleanName(const std::string& mameName)
|
||||
{
|
||||
return Utils::String::removeParenthesis(getRealName(mameName));
|
||||
static const bool stripInfo {Settings::getInstance()->getBool("MAMENameStripExtraInfo")};
|
||||
if (stripInfo)
|
||||
return Utils::String::removeParenthesis(getRealName(mameName));
|
||||
else
|
||||
return getRealName(mameName);
|
||||
}
|
||||
|
||||
const bool isBios(const std::string& biosName)
|
||||
|
|
|
@ -270,6 +270,7 @@ void Settings::setDefaults()
|
|||
mBoolMap["ShowHiddenGames"] = {true, true};
|
||||
mBoolMap["CustomEventScripts"] = {false, false};
|
||||
mBoolMap["ParseGamelistOnly"] = {false, false};
|
||||
mBoolMap["MAMENameStripExtraInfo"] = {true, true};
|
||||
#if defined(__unix__)
|
||||
mBoolMap["DisableComposition"] = {false, false};
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue