mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed a bug where SystemView wouldn't properly loop the systems.
This commit is contained in:
parent
ebc6aabe93
commit
8b3d2c7ef0
1
NEWS.md
1
NEWS.md
|
@ -43,4 +43,5 @@ v1.0.0
|
||||||
* Restart and power-off menu entries not working
|
* Restart and power-off menu entries not working
|
||||||
* Toggling the screensaver didn't work as expected
|
* 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
|
* 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
|
* Lots and lots of small bugs and inconsistencies fixed
|
||||||
|
|
|
@ -244,9 +244,9 @@ void SystemView::onCursorChanged(const CursorState& /*state*/)
|
||||||
float endPos = target; // Directly.
|
float endPos = target; // Directly.
|
||||||
float dist = abs(endPos - startPos);
|
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).
|
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).
|
endPos = target - posMax; // Loop around the start (max - 1 -> -1).
|
||||||
|
|
||||||
// Animate mSystemInfo's opacity (fade out, wait, fade back in).
|
// Animate mSystemInfo's opacity (fade out, wait, fade back in).
|
||||||
|
|
Loading…
Reference in a new issue