Change: make for smooth-scrolling based on actual time

This means if rendering takes a bit longer, scrolling goes a bit
quicker, making travel time always about the same time for the
same distance.
This commit is contained in:
Patric Stout
2024-01-22 16:45:00 +01:00
committed by Patric Stout
parent cbb24b5d71
commit ea8c1d8597
5 changed files with 61 additions and 29 deletions

View File

@@ -3066,7 +3066,7 @@ void UpdateWindows()
for (Window *w : Window::Iterate()) {
/* Update viewport only if window is not shaded. */
if (w->viewport != nullptr && !w->IsShaded()) UpdateViewportPosition(w);
if (w->viewport != nullptr && !w->IsShaded()) UpdateViewportPosition(w, delta_ms.count());
}
NetworkDrawChatMessage();
/* Redraw mouse cursor in case it was hidden */