From 0cbd7002902e91d5e5023a91aa87dd94332fc07b Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sun, 12 Apr 2020 11:32:39 +0200 Subject: [PATCH] Warn to console if no autosave could be saved (#11255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Warn to console if no autosave could be saved. * Use std::fprintf as suggested. * Update src/openrct2/Game.cpp Co-Authored-By: Michał Janiszewski Co-authored-by: Michał Janiszewski --- src/openrct2/Game.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 111e5d368f..84ecbabb67 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -65,6 +65,7 @@ #include "world/Water.h" #include +#include #include #include @@ -790,7 +791,8 @@ void game_autosave() platform_file_copy(path, backupPath, true); } - scenario_save(path, saveFlags); + if (!scenario_save(path, saveFlags)) + std::fprintf(stderr, "Could not autosave the scenario. Is the save folder writeable?\n"); } static void game_load_or_quit_no_save_prompt_callback(int32_t result, const utf8* path)