From 0f327582c1c0a2b3ba425235bb857e25f5ac7fef Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 16 Oct 2022 15:00:38 +0200 Subject: [PATCH] Fixed an issue where ScrollableContainer would reset too early. --- es-core/src/components/ScrollableContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index d8e4fc932..1199fb11c 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -188,8 +188,8 @@ void ScrollableContainer::update(int deltaTime) if (mScrollPos.y < 0.0f) mScrollPos.y = 0.0f; - if (mScrollPos.x + mSize.x > contentSize.x) { - mScrollPos.x = contentSize.x - mSize.x; + if (mScrollPos.x + std::round(mSize.x) > contentSize.x) { + mScrollPos.x = contentSize.x - std::round(mSize.x); mAtEnd = true; }