mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 23:15:38 +00:00
Fixed an issue where the gameselector element would include non-kid games while in kid UI mode.
This commit is contained in:
parent
f5b4356444
commit
94498bb706
|
@ -1290,6 +1290,16 @@ FileData* SystemData::getRandomGame(const FileData* currentGame, bool gameSelect
|
|||
else {
|
||||
if (gameSelectorMode) {
|
||||
gameList = mRootFolder->getFilesRecursive(GAME, false, false);
|
||||
if (Settings::getInstance()->getString("UIMode") == "kid") {
|
||||
// Doing some extra work here instead of in FileData is OK as it's only needed
|
||||
// for the rare combination of a gameselector being present while in kid mode.
|
||||
for (auto it = gameList.begin(); it != gameList.end();) {
|
||||
if (!(*it)->getKidgame())
|
||||
it = gameList.erase(it);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
gameList = ViewController::getInstance()
|
||||
|
|
Loading…
Reference in a new issue