Warn to console if no autosave could be saved (#11255)

* Warn to console if no autosave could be saved.

* Use std::fprintf as suggested.

* Update src/openrct2/Game.cpp

Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com>

Co-authored-by: Michał Janiszewski <janisozaur@users.noreply.github.com>
This commit is contained in:
Aaron van GeffenandMichał Janiszewski authored and GitHub committed 2020-04-12 11:32:39 +02:00
1 parent b5336fc6b6
commit 0cbd700290
1 file changed
+3 -1
+3 -1
View File
@@ -65,6 +65,7 @@
#include "world/Water.h"
#include <algorithm>
#include <cstdio>
#include <iterator>
#include <memory>
@@ -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)