mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 07:43:01 +01:00
Fix #21565: Giant screenshots not working correctly
This commit is contained in:
@@ -325,6 +325,8 @@ static Viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom)
|
|||||||
viewport.width = zoom.ApplyInversedTo(viewport.view_width);
|
viewport.width = zoom.ApplyInversedTo(viewport.view_width);
|
||||||
viewport.height = zoom.ApplyInversedTo(viewport.view_height);
|
viewport.height = zoom.ApplyInversedTo(viewport.view_height);
|
||||||
viewport.zoom = zoom;
|
viewport.zoom = zoom;
|
||||||
|
viewport.rotation = rotation;
|
||||||
|
|
||||||
return viewport;
|
return viewport;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,7 +500,6 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti
|
|||||||
auto zoom = ZoomLevel{ customZoom };
|
auto zoom = ZoomLevel{ customZoom };
|
||||||
auto rotation = std::atoi(argv[4]) & 3;
|
auto rotation = std::atoi(argv[4]) & 3;
|
||||||
viewport = GetGiantViewport(rotation, zoom);
|
viewport = GetGiantViewport(rotation, zoom);
|
||||||
viewport.rotation = rotation;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -650,14 +651,13 @@ void CaptureImage(const CaptureOptions& options)
|
|||||||
viewport.viewPos = { coords2d.x - ((options.Zoom.ApplyTo(viewport.view_width)) / 2),
|
viewport.viewPos = { coords2d.x - ((options.Zoom.ApplyTo(viewport.view_width)) / 2),
|
||||||
coords2d.y - ((options.Zoom.ApplyTo(viewport.view_height)) / 2) };
|
coords2d.y - ((options.Zoom.ApplyTo(viewport.view_height)) / 2) };
|
||||||
viewport.zoom = options.Zoom;
|
viewport.zoom = options.Zoom;
|
||||||
|
viewport.rotation = options.Rotation;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
viewport = GetGiantViewport(options.Rotation, options.Zoom);
|
viewport = GetGiantViewport(options.Rotation, options.Zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
viewport.rotation = options.Rotation;
|
|
||||||
|
|
||||||
if (options.Transparent)
|
if (options.Transparent)
|
||||||
{
|
{
|
||||||
viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;
|
viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;
|
||||||
|
|||||||
Reference in New Issue
Block a user