From c211292fdd644018d2f57ee4f4a686d27c2e8a43 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 26 Aug 2019 14:50:47 +0100 Subject: [PATCH] Fix #9941: Giant screenshot's made from command line aren't positioned right --- src/openrct2/interface/Screenshot.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 6c72e85c74..9cbdab5b3e 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -594,7 +594,10 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption drawing_engine_init(); - context->LoadParkFromFile(inputPath); + if (!context->LoadParkFromFile(inputPath)) + { + throw std::runtime_error("Failed to load park."); + } gIntroState = INTRO_STATE_NONE; gScreenFlags = SCREEN_FLAGS_PLAYING; @@ -605,6 +608,7 @@ int32_t cmdline_for_screenshot(const char** argv, int32_t argc, ScreenshotOption auto zoom = std::atoi(argv[3]); auto rotation = std::atoi(argv[4]) & 3; viewport = GetGiantViewport(gMapSize, rotation, zoom); + gCurrentRotation = rotation; } else {