mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Scroll after updating tier so isScrolling() returns accurately.
This commit is contained in:
parent
1aa291ebe7
commit
63749d2d9d
|
@ -160,10 +160,11 @@ protected:
|
||||||
mScrollCursorAccumulator += deltaTime;
|
mScrollCursorAccumulator += deltaTime;
|
||||||
mScrollTierAccumulator += deltaTime;
|
mScrollTierAccumulator += deltaTime;
|
||||||
|
|
||||||
|
int scrollCount = 0;
|
||||||
while(mScrollCursorAccumulator >= SCROLL_SPEED[mScrollTier].scrollDelay)
|
while(mScrollCursorAccumulator >= SCROLL_SPEED[mScrollTier].scrollDelay)
|
||||||
{
|
{
|
||||||
mScrollCursorAccumulator -= SCROLL_SPEED[mScrollTier].scrollDelay;
|
mScrollCursorAccumulator -= SCROLL_SPEED[mScrollTier].scrollDelay;
|
||||||
scroll(mScrollVelocity);
|
scrollCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// are we ready to go even FASTER?
|
// are we ready to go even FASTER?
|
||||||
|
@ -172,6 +173,9 @@ protected:
|
||||||
mScrollTierAccumulator -= SCROLL_SPEED[mScrollTier].length;
|
mScrollTierAccumulator -= SCROLL_SPEED[mScrollTier].length;
|
||||||
mScrollTier++;
|
mScrollTier++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < scrollCount; i++)
|
||||||
|
scroll(mScrollVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void scroll(int amt)
|
void scroll(int amt)
|
||||||
|
|
Loading…
Reference in a new issue