video zoom: Fix zoom when script_res != video_res

This commit is contained in:
arch1t3cht 2023-01-20 00:18:51 +01:00
parent cba8d3644f
commit 352e41f19b
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ void VideoDisplay::SetVideoZoom(int step) {
}
// Mouse coordinates, relative to the video, at the current zoom level
Vector2D mp = GetMousePosition() * videoZoomValue * windowZoomValue;
Vector2D mp = last_mouse_pos - Vector2D(viewport_left, viewport_top) / scale_factor;
// The video size will change by this many pixels
int pixelChangeW = std::lround(videoSize.GetWidth() * (newVideoZoom / videoZoomValue - 1.0));