mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed an issue where the random game function would return an empty result.
This commit is contained in:
parent
eb99e3edeb
commit
844d733c89
|
@ -573,6 +573,9 @@ FileData* SystemData::getRandomGame(const FileData* currentGame)
|
||||||
{
|
{
|
||||||
std::vector<FileData*> gameList = mRootFolder->getFilesRecursive(GAME, true);
|
std::vector<FileData*> gameList = mRootFolder->getFilesRecursive(GAME, true);
|
||||||
|
|
||||||
|
if (gameList.size() == 1)
|
||||||
|
return gameList.front();
|
||||||
|
|
||||||
if (currentGame && currentGame->getType() == PLACEHOLDER)
|
if (currentGame && currentGame->getType() == PLACEHOLDER)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue