Fix #20845: Outdated message box in case of save failure

This commit is contained in:
Severin Paul Höfer 2024-01-22 19:44:20 +01:00 committed by GitHub
parent 8e88f464b3
commit 2c26799ca4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 20 deletions

View File

@ -7,6 +7,7 @@
- Fix: [#20255] Images from the last hovered-over coaster in the object selection are not freed.
- Fix: [#20616] Confirmation button in the track designers quit prompt has the wrong text.
- Fix: [#20628] Moving caret using Ctrl+left can move too far when using a multibyte grapheme.
- Fix: [#20845] Trying to save under a folder with no write permissions causes a crash.
- Fix: [#21054] “No entrance” style is selected by default in the track designer.
- Fix: [#21145] [Plugin] setInterval/setTimeout handle conflict.
- Fix: [#21157] [Plugin] Widgets do not redraw correctly when updating disabled or visibility state.

View File

@ -2587,26 +2587,6 @@ int32_t ScenarioSave(GameState_t& gameState, u8string_view path, int32_t flags)
ft.Add<const char*>(e.what());
ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_STRING, ft);
GfxInvalidateScreen();
auto ctx = OpenRCT2::GetContext();
auto uictx = ctx->GetUiContext();
std::string title = "Error while saving";
std::string message
= "There was an error while saving scenario.\nhttps://github.com/OpenRCT2/OpenRCT2/issues/17664\nWe would like to "
"collect more information about this issue, if this did not happen due to missing permissions, lack of space, "
"etc. please consider submitting a bug report. To collect information we would like to trigger an assert.";
std::string report_bug_button = "Report bug, trigger an assert, potentially terminating the game";
std::string skip_button = "Skip reporting, let me continue";
std::vector<std::string> buttons{ std::move(report_bug_button), std::move(skip_button) };
int choice = uictx->ShowMessageBox(title, message, buttons);
if (choice == 0)
{
Guard::Assert(false, "Error while saving: %s", e.what());
}
}
GfxInvalidateScreen();