Fix #7655: Large portions of the screen do not invalidate properly

Also fixes #7676.
Error was introduced during refactoring in 85dc161c5a.
This commit is contained in:
Michael Steenbeek 2018-06-14 12:01:55 +02:00 committed by GitHub
parent 9e9c2c072e
commit 9436dab66c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -482,12 +482,14 @@ public:
if (mainWindow != nullptr)
{
auto viewport = window_get_viewport(mainWindow);
auto zoomDifference = zoom - viewport->zoom;
mainWindow->viewport_target_sprite = SPRITE_INDEX_NULL;
mainWindow->saved_view_x = x;
mainWindow->saved_view_y = y;
viewport->zoom = zoom;
gCurrentRotation = rotation;
auto zoomDifference = zoom - viewport->zoom;
if (zoomDifference != 0)
{
viewport->view_width <<= zoomDifference;