Made the navigation feel more responsive when using the video view style.

This commit is contained in:
Leon Styhre 2020-11-19 17:12:31 +01:00
parent 401d433be0
commit 08c0bc1a43
2 changed files with 4 additions and 10 deletions

View file

@ -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();

View file

@ -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();