mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45: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__)
|
#if defined(__unix__)
|
||||||
// Whether to disable desktop composition.
|
// Whether to disable desktop composition.
|
||||||
auto disableComposition = std::make_shared<SwitchComponent>();
|
auto disableComposition = std::make_shared<SwitchComponent>();
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#ifndef ES_CORE_MAMENAMES_H
|
#ifndef ES_CORE_MAMENAMES_H
|
||||||
#define ES_CORE_MAMENAMES_H
|
#define ES_CORE_MAMENAMES_H
|
||||||
|
|
||||||
|
#include "Settings.h"
|
||||||
#include "utils/StringUtil.h"
|
#include "utils/StringUtil.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -36,7 +37,11 @@ public:
|
||||||
|
|
||||||
std::string getCleanName(const std::string& mameName)
|
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)
|
const bool isBios(const std::string& biosName)
|
||||||
|
|
|
@ -270,6 +270,7 @@ void Settings::setDefaults()
|
||||||
mBoolMap["ShowHiddenGames"] = {true, true};
|
mBoolMap["ShowHiddenGames"] = {true, true};
|
||||||
mBoolMap["CustomEventScripts"] = {false, false};
|
mBoolMap["CustomEventScripts"] = {false, false};
|
||||||
mBoolMap["ParseGamelistOnly"] = {false, false};
|
mBoolMap["ParseGamelistOnly"] = {false, false};
|
||||||
|
mBoolMap["MAMENameStripExtraInfo"] = {true, true};
|
||||||
#if defined(__unix__)
|
#if defined(__unix__)
|
||||||
mBoolMap["DisableComposition"] = {false, false};
|
mBoolMap["DisableComposition"] = {false, false};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue