mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 07:35:38 +00:00
The alternative emulator badges and filters are now disabled if the per-game setting has been disabled.
This commit is contained in:
parent
5d3ce8b92e
commit
fd980d7e4a
|
@ -151,6 +151,11 @@ void GuiGamelistFilter::addFiltersToMenu()
|
|||
it != decls.cend(); it++) {
|
||||
FilterIndexType type = (*it).type; // Type of filter.
|
||||
|
||||
// Don't include the alternative emulators if the corresponding setting has been disabled.
|
||||
if (type == ALTEMULATOR_FILTER &&
|
||||
!Settings::getInstance()->getBool("AlternativeEmulatorPerGame"))
|
||||
continue;
|
||||
|
||||
std::map<std::string, int>* allKeys = (*it).allIndexKeys;
|
||||
|
||||
bool exclusiveSelect = false;
|
||||
|
|
|
@ -1069,6 +1069,8 @@ void GuiMenu::openOtherOptions()
|
|||
Settings::getInstance()->setBool("AlternativeEmulatorPerGame",
|
||||
alternativeEmulatorPerGame->getState());
|
||||
s->setNeedsSaving();
|
||||
s->setNeedsReloading();
|
||||
s->setInvalidateCachedBackground();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -104,6 +104,13 @@ void BadgeComponent::setBadges(const std::vector<BadgeInfo>& badges)
|
|||
[badge](FlexboxComponent::FlexboxItem item) { return item.label == badge.badgeType; });
|
||||
|
||||
if (it != mFlexboxItems.end()) {
|
||||
|
||||
// Don't show the alternative emulator badge if the corresponding setting has been
|
||||
// disabled.
|
||||
if (badge.badgeType == "altemulator" &&
|
||||
!Settings::getInstance()->getBool("AlternativeEmulatorPerGame"))
|
||||
continue;
|
||||
|
||||
it->visible = true;
|
||||
if (badge.gameController != "" &&
|
||||
badge.gameController != it->overlayImage.getTexture()->getTextureFilePath()) {
|
||||
|
|
Loading…
Reference in a new issue