diff --git a/NEWS.md b/NEWS.md index 2ac61ee5a..b84a783ac 100644 --- a/NEWS.md +++ b/NEWS.md @@ -43,4 +43,5 @@ v1.0.0 * Restart and power-off menu entries not working * Toggling the screensaver didn't work as expected * Deleting a game did not delete the game media files or its entry in the gamelist.xml file +* SystemView didn't properly loop the systems if only two systems were available * Lots and lots of small bugs and inconsistencies fixed diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 169ab6b21..7b542b8b3 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -244,9 +244,9 @@ void SystemView::onCursorChanged(const CursorState& /*state*/) float endPos = target; // Directly. float dist = abs(endPos - startPos); - if (abs(target + posMax - startPos) < dist) + if (abs(target + posMax - startPos - mScrollVelocity) < dist) endPos = target + posMax; // Loop around the end (0 -> max). - if (abs(target - posMax - startPos) < dist) + if (abs(target - posMax - startPos - mScrollVelocity) < dist) endPos = target - posMax; // Loop around the start (max - 1 -> -1). // Animate mSystemInfo's opacity (fade out, wait, fade back in).