From 08c0bc1a432fb5913ab9351dee640f0fc20308ab Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 19 Nov 2020 17:12:31 +0100 Subject: [PATCH] Made the navigation feel more responsive when using the video view style. --- es-app/src/views/ViewController.cpp | 10 ---------- es-app/src/views/gamelist/ISimpleGameListView.cpp | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index f423bdb03..1420074d5 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -199,11 +199,6 @@ void ViewController::goToSystemView(SystemData* system, bool playTransition) mPreviousView = mCurrentView; - // Pause the video. The onHide() call will take place later in the transition animation lambda - // function. For views without videos this has no effect (and no adverse effect either). - if (mCurrentView) - mCurrentView->onPauseVideo(); - if (system->isGroupedCustomCollection()) system = system->getRootFolder()->getParent()->getSystem(); @@ -322,11 +317,6 @@ void ViewController::goToGameList(SystemData* system) if (slideTransitions) cancelViewTransitions(); - // Pause the video. The onHide() call will take place later in the transition animation lambda - // function. For views without videos this has no effect (and no adverse effect either). - else if (mCurrentView) - mCurrentView->onPauseVideo(); - if (mState.viewing == SYSTEM_SELECT) { // Move the system list. auto sysList = getSystemListView(); diff --git a/es-app/src/views/gamelist/ISimpleGameListView.cpp b/es-app/src/views/gamelist/ISimpleGameListView.cpp index 6485f3670..6a6fbd502 100644 --- a/es-app/src/views/gamelist/ISimpleGameListView.cpp +++ b/es-app/src/views/gamelist/ISimpleGameListView.cpp @@ -104,6 +104,7 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) if (config->isMappedTo("a", input)) { FileData* cursor = getCursor(); if (cursor->getType() == GAME) { + onPauseVideo(); ViewController::get()->cancelViewTransitions(); stopListScrolling(); launch(cursor); @@ -135,6 +136,7 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) } else { NavigationSounds::getInstance()->playThemeNavigationSound(BACKSOUND); + onPauseVideo(); onFocusLost(); stopListScrolling(); SystemData* systemToView = getCursor()->getSystem(); @@ -150,6 +152,7 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) } else if (config->isMappedLike(getQuickSystemSelectRightButton(), input)) { if (Settings::getInstance()->getBool("QuickSystemSelect")) { + onPauseVideo(); onFocusLost(); stopListScrolling(); ViewController::get()->goToNextGameList(); @@ -158,6 +161,7 @@ bool ISimpleGameListView::input(InputConfig* config, Input input) } else if (config->isMappedLike(getQuickSystemSelectLeftButton(), input)) { if (Settings::getInstance()->getBool("QuickSystemSelect")) { + onPauseVideo(); onFocusLost(); stopListScrolling(); ViewController::get()->goToPrevGameList();