diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 78797261d..e89b863ee 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -318,18 +318,24 @@ void SystemView::onCursorChanged(const CursorState& state) Animation* anim; float animTime {380.0f}; - float timeDiff {1.0f}; - // If startPos is inbetween two positions then reduce the time slightly as the distance will - // be shorter meaning the animation would play for too long if not compensated for. - if (scrollVelocity == 1) - timeDiff = endPos - startPos; - else if (scrollVelocity == -1) - timeDiff = startPos - endPos; + if (mGrid != nullptr) { + animTime = 250.0f; + } + else { + float timeDiff {1.0f}; - if (timeDiff != 1.0f) - animTime = - glm::clamp(std::fabs(glm::mix(0.0f, animTime, timeDiff * 1.5f)), 200.0f, animTime); + // If startPos is inbetween two positions then reduce the time slightly as the distance will + // be shorter meaning the animation would play for too long if not compensated for. + if (scrollVelocity == 1) + timeDiff = endPos - startPos; + else if (scrollVelocity == -1) + timeDiff = startPos - endPos; + + if (timeDiff != 1.0f) + animTime = + glm::clamp(std::fabs(glm::mix(0.0f, animTime, timeDiff * 1.5f)), 200.0f, animTime); + } if (transitionStyle == "fade") { float startFade {mFadeOpacity}; diff --git a/es-core/src/components/primary/GridComponent.h b/es-core/src/components/primary/GridComponent.h index 95d67ae17..e09ac83a7 100644 --- a/es-core/src/components/primary/GridComponent.h +++ b/es-core/src/components/primary/GridComponent.h @@ -348,9 +348,10 @@ template bool GridComponent::input(InputConfig* config, Input in return true; } if (config->isMappedLike("down", input)) { - if (mCursor >= (mColumns * mRowCount) - mColumns && - static_cast(mEntries.size()) - mCursor <= mColumns && - mEntries.size() % mColumns == 0) + if (mCursor >= (mColumns * mRowCount) - mColumns && size() - mCursor <= mColumns && + size() % mColumns == 0) + return true; + if (size() < mColumns) return true; if (mCancelTransitionsCallback) mCancelTransitionsCallback();