Game media can now be displayed from the grouped custom collections view.

This commit is contained in:
Leon Styhre 2021-06-21 17:10:31 +02:00
parent 0581475666
commit 5efe3be338
2 changed files with 14 additions and 8 deletions

View file

@ -314,13 +314,6 @@ std::vector<HelpPrompt> BasicGameListView::getHelpPrompts()
prompts.push_back(HelpPrompt("up/down", "choose"));
prompts.push_back(HelpPrompt("a", "launch"));
prompts.push_back(HelpPrompt("b", "back"));
if (mRoot->getSystem()->isGameSystem() &&
mRoot->getSystem()->getThemeFolder() != "custom-collections")
prompts.push_back(HelpPrompt("x", "view media"));
if (mRoot->getSystem()->isGameSystem() && !mCursorStack.empty() &&
mRoot->getSystem()->getThemeFolder() == "custom-collections")
prompts.push_back(HelpPrompt("x", "view media"));
if (!UIModeController::getInstance()->isUIModeKid())

View file

@ -183,6 +183,19 @@ bool ISimpleGameListView::input(InputConfig* config, Input input)
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND);
return true;
}
else if (config->isMappedTo("x", input) &&
mRoot->getSystem()->getThemeFolder() == "custom-collections" &&
mCursorStack.empty() && ViewController::get()->getState().viewing ==
ViewController::GAME_LIST) {
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND);
// Jump to the randomly selected game.
if (mRandomGame) {
stopListScrolling();
ViewController::get()->cancelViewTransitions();
mWindow->startMediaViewer(mRandomGame);
return true;
}
}
else if (mRoot->getSystem()->isGameSystem()) {
stopListScrolling();
ViewController::get()->cancelViewTransitions();