From 844d733c89d45a24d121d835c21d349d3f2a4cf2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 20 Oct 2020 22:02:33 +0200 Subject: [PATCH] Fixed an issue where the random game function would return an empty result. --- es-app/src/SystemData.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 6075a5900..1a963d198 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -573,6 +573,9 @@ FileData* SystemData::getRandomGame(const FileData* currentGame) { std::vector gameList = mRootFolder->getFilesRecursive(GAME, true); + if (gameList.size() == 1) + return gameList.front(); + if (currentGame && currentGame->getType() == PLACEHOLDER) return nullptr;