1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 00:04:43 +01:00

Resolve issues with save before load/quit prompt

This commit is contained in:
Ethan O'Brien
2025-08-10 14:30:26 -05:00
parent 1eff246b1a
commit a784fe46fe
3 changed files with 10 additions and 9 deletions

View File

@@ -78,7 +78,7 @@
#ifdef __EMSCRIPTEN__
extern "C" {
extern void EmscriptenSaveGame(bool isTrackDesign, bool isAutosave, bool saveAs, LoadSaveType type);
extern void EmscriptenSaveGame(bool isTrackDesign, bool isAutosave, LoadSaveType type);
extern void EmscriptenResetAutosave();
}
#endif
@@ -468,7 +468,7 @@ void SaveGame()
#else
const auto savePath = Path::WithExtension("save", ".park");
SaveGameWithName(savePath);
EmscriptenSaveGame(false, false, false, LoadSaveType::park);
EmscriptenSaveGame(false, false, LoadSaveType::park);
#endif
}
else
@@ -521,6 +521,9 @@ std::unique_ptr<Intent> CreateSaveGameAsIntent()
void SaveGameAs()
{
#ifdef __EMSCRIPTEN__
EmscriptenResetAutosave();
#endif
auto intent = CreateSaveGameAsIntent();
ContextOpenIntent(intent.get());
}
@@ -632,7 +635,7 @@ void GameAutosave()
{
const auto savePath = Path::WithExtension("save", ".park");
SaveGameWithName(savePath);
EmscriptenSaveGame(false, true, false, LoadSaveType::park);
EmscriptenSaveGame(false, true, LoadSaveType::park);
}
#endif // __EMSCRIPTEN__