From eb6b554d77446c04bab8bc2aa1007c7d317f6885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Thu, 24 Apr 2025 18:19:59 +0300 Subject: [PATCH] Fix screenshots not having a render context --- src/openrct2/interface/Screenshot.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 88ef20a282..b2adbf6e36 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -316,8 +316,13 @@ static void RenderViewport(IDrawingEngine* drawingEngine, const Viewport& viewpo tempDrawingEngine = std::make_unique(GetContext()->GetUiContext()); drawingEngine = tempDrawingEngine.get(); } + + tempDrawingEngine->BeginDraw(); + dpi.DrawingEngine = drawingEngine; ViewportRender(dpi, &viewport); + + tempDrawingEngine->EndDraw(); } void ScreenshotGiant()