mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-18 04:45:39 +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++) {
|
it != decls.cend(); it++) {
|
||||||
FilterIndexType type = (*it).type; // Type of filter.
|
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;
|
std::map<std::string, int>* allKeys = (*it).allIndexKeys;
|
||||||
|
|
||||||
bool exclusiveSelect = false;
|
bool exclusiveSelect = false;
|
||||||
|
|
|
@ -1069,6 +1069,8 @@ void GuiMenu::openOtherOptions()
|
||||||
Settings::getInstance()->setBool("AlternativeEmulatorPerGame",
|
Settings::getInstance()->setBool("AlternativeEmulatorPerGame",
|
||||||
alternativeEmulatorPerGame->getState());
|
alternativeEmulatorPerGame->getState());
|
||||||
s->setNeedsSaving();
|
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; });
|
[badge](FlexboxComponent::FlexboxItem item) { return item.label == badge.badgeType; });
|
||||||
|
|
||||||
if (it != mFlexboxItems.end()) {
|
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;
|
it->visible = true;
|
||||||
if (badge.gameController != "" &&
|
if (badge.gameController != "" &&
|
||||||
badge.gameController != it->overlayImage.getTexture()->getTextureFilePath()) {
|
badge.gameController != it->overlayImage.getTexture()->getTextureFilePath()) {
|
||||||
|
|
Loading…
Reference in a new issue