From 5efe3be338f3ae2010cb456432628a5f63848a3f Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 21 Jun 2021 17:10:31 +0200 Subject: [PATCH] Game media can now be displayed from the grouped custom collections view. --- es-app/src/views/gamelist/BasicGameListView.cpp | 9 +-------- es-app/src/views/gamelist/ISimpleGameListView.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/es-app/src/views/gamelist/BasicGameListView.cpp b/es-app/src/views/gamelist/BasicGameListView.cpp index 6a358d219..e56c6ed59 100644 --- a/es-app/src/views/gamelist/BasicGameListView.cpp +++ b/es-app/src/views/gamelist/BasicGameListView.cpp @@ -314,14 +314,7 @@ std::vector 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")); + prompts.push_back(HelpPrompt("x", "view media")); if (!UIModeController::getInstance()->isUIModeKid()) prompts.push_back(HelpPrompt("back", "options")); diff --git a/es-app/src/views/gamelist/ISimpleGameListView.cpp b/es-app/src/views/gamelist/ISimpleGameListView.cpp index 5cad9523b..daae17807 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.cpp +++ b/es-app/src/views/gamelist/ISimpleGameListView.cpp @@ -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();