Fix #9941: Giant screenshot's made from command line aren't positioned right

This commit is contained in:
Ted John 2019-08-26 14:50:47 +01:00
parent 48bc28b618
commit c211292fdd
1 changed files with 5 additions and 1 deletions

View File

@ -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
{