[Scummvm-git-logs] scummvm master -> fcf707e20a7a7aef5ccd15e8fb8f62eb029f932b

csnover csnover at users.noreply.github.com
Sun Sep 24 04:40:15 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fcf707e20a SCI32: Flush stub RAMA save game to disk


Commit: fcf707e20a7a7aef5ccd15e8fb8f62eb029f932b
    https://github.com/scummvm/scummvm/commit/fcf707e20a7a7aef5ccd15e8fb8f62eb029f932b
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-09-23T21:39:58-05:00

Commit Message:
SCI32: Flush stub RAMA save game to disk

If this is not done and the file is buffered, it will not show up
in the list of save games, and the new save will fail.

Changed paths:
    engines/sci/engine/guest_additions.cpp


diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index eee26ac..06cf0c9 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -596,8 +596,13 @@ reg_t GuestAdditions::promptSaveRestoreRama(EngineState *s, int argc, reg_t *arg
 				// We need to touch the save file just so it exists here, since
 				// otherwise the game will not let us save to the new save slot
 				// (it will try to come up with a brand new slot instead)
-				Common::ScopedPtr<Common::OutSaveFile> out(g_sci->getSaveFileManager()->openForSaving(g_sci->getSavegameName(saveNo)));
-				set_savegame_metadata(out.get(), saveGameName, "");
+				Common::OutSaveFile *out = g_sci->getSaveFileManager()->openForSaving(g_sci->getSavegameName(saveNo));
+				set_savegame_metadata(out, saveGameName, "");
+
+				// Make sure the save file is fully written before we try to
+				// re-retrieve the list of saves, since otherwise it may not
+				// show up in the list
+				delete out;
 
 				// We have to re-retrieve saves and find the index instead of
 				// assuming the newest save will be in index 0 because save game





More information about the Scummvm-git-logs mailing list