Update viewport positions in two stages

This commit is contained in:
Jonathan G Rennison
2023-09-18 20:25:05 +01:00
parent 96ed5b5cad
commit 290822d150
5 changed files with 39 additions and 18 deletions

View File

@@ -251,7 +251,8 @@ struct SelectGameWindow : public Window {
/* Update the viewport position. */
mw->viewport->dest_scrollpos_x = mw->viewport->scrollpos_x = pos.x;
mw->viewport->dest_scrollpos_y = mw->viewport->scrollpos_y = pos.y;
UpdateViewportPosition(mw);
UpdateNextViewportPosition(mw);
ApplyNextViewportPosition(mw);
mw->SetDirty(); // Required during panning, otherwise logo graphics disappears
/* If there is only one command, we just executed it and don't need to do any more */