Disable random game selection in retropie settings menu

This commit is contained in:
Koerty 2018-04-07 14:21:02 +02:00
parent 61da776b71
commit 24c8a910e2
3 changed files with 12 additions and 7 deletions

View file

@ -151,7 +151,8 @@ std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
prompts.push_back(HelpPrompt("a", "launch"));
prompts.push_back(HelpPrompt("b", "back"));
prompts.push_back(HelpPrompt("select", "options"));
prompts.push_back(HelpPrompt("x", "random"));
if(mRoot->getSystem()->isGameSystem())
prompts.push_back(HelpPrompt("x", "random"));
if(mRoot->getSystem()->isGameSystem() && !UIModeController::getInstance()->isUIModeKid())
{
std::string prompt = CollectionSystemManager::get()->getEditingCollection();

View file

@ -357,7 +357,8 @@ std::vector<HelpPrompt> GridGameListView::getHelpPrompts()
prompts.push_back(HelpPrompt("a", "launch"));
prompts.push_back(HelpPrompt("b", "back"));
prompts.push_back(HelpPrompt("select", "options"));
prompts.push_back(HelpPrompt("x", "random"));
if(mRoot->getSystem()->isGameSystem())
prompts.push_back(HelpPrompt("x", "random"));
if(mRoot->getSystem()->isGameSystem() && !UIModeController::getInstance()->isUIModeKid())
{
std::string prompt = CollectionSystemManager::get()->getEditingCollection();

View file

@ -136,13 +136,16 @@ bool ISimpleGameListView::input(InputConfig* config, Input input)
}
}else if (config->isMappedTo("x", input))
{
// go to random system game
FileData* randomGame = getCursor()->getSystem()->getRandomGame();
if (randomGame)
if (mRoot->getSystem()->isGameSystem())
{
setCursor(randomGame);
// go to random system game
FileData* randomGame = getCursor()->getSystem()->getRandomGame();
if (randomGame)
{
setCursor(randomGame);
}
return true;
}
return true;
}else if (config->isMappedTo("y", input) && !(UIModeController::getInstance()->isUIModeKid()))
{
if(mRoot->getSystem()->isGameSystem())