From 15314fff84590e2134c8e11184e1b8de4455cc6b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 19 Aug 2022 17:17:34 +0200 Subject: [PATCH] Eliminated some incorrect and unnecessary cursor stops in IList. Also got rid of some unnecessary cursor stops triggered by TextListComponent. --- es-core/src/components/IList.h | 3 +++ es-core/src/components/primary/TextListComponent.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/IList.h b/es-core/src/components/IList.h index ff0fd307e..e8300ee6d 100644 --- a/es-core/src/components/IList.h +++ b/es-core/src/components/IList.h @@ -101,6 +101,9 @@ public: void stopScrolling() { + if (mScrollVelocity == 0) + return; + mTitleOverlayOpacity = 0.0f; listInput(0); diff --git a/es-core/src/components/primary/TextListComponent.h b/es-core/src/components/primary/TextListComponent.h index 1366629d2..3bf27b1f0 100644 --- a/es-core/src/components/primary/TextListComponent.h +++ b/es-core/src/components/primary/TextListComponent.h @@ -282,7 +282,7 @@ template void TextListComponent::update(int deltaTime) { List::listUpdate(deltaTime); - if (mWindow->isScreensaverActive() || !mWindow->getAllowTextScrolling()) + if (isScrolling() && (mWindow->isScreensaverActive() || !mWindow->getAllowTextScrolling())) List::stopScrolling(); if (!isScrolling() && size() > 0) {