From 6950a74b37bc3036ca126068c55a15c6aab5642b Mon Sep 17 00:00:00 2001 From: Matt <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:24:40 +0200 Subject: [PATCH] Fix #21565: Giant screenshots not working correctly --- src/openrct2/interface/Screenshot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 3d6f2227b1..9c649088b3 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -325,6 +325,8 @@ static Viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) viewport.width = zoom.ApplyInversedTo(viewport.view_width); viewport.height = zoom.ApplyInversedTo(viewport.view_height); viewport.zoom = zoom; + viewport.rotation = rotation; + return viewport; } @@ -498,7 +500,6 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti auto zoom = ZoomLevel{ customZoom }; auto rotation = std::atoi(argv[4]) & 3; viewport = GetGiantViewport(rotation, zoom); - viewport.rotation = rotation; } else { @@ -650,14 +651,13 @@ void CaptureImage(const CaptureOptions& options) viewport.viewPos = { coords2d.x - ((options.Zoom.ApplyTo(viewport.view_width)) / 2), coords2d.y - ((options.Zoom.ApplyTo(viewport.view_height)) / 2) }; viewport.zoom = options.Zoom; + viewport.rotation = options.Rotation; } else { viewport = GetGiantViewport(options.Rotation, options.Zoom); } - viewport.rotation = options.Rotation; - if (options.Transparent) { viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;