From 7e9837b5760373e9658307c79ccbdf52deed37bf Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Wed, 23 Feb 2022 21:21:01 +0100 Subject: [PATCH] truncated state files (fixes #875) --- src/common/StateManager.cxx | 2 +- src/common/StateManager.hxx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/StateManager.cxx b/src/common/StateManager.cxx index 2559890a6..73a31216e 100644 --- a/src/common/StateManager.cxx +++ b/src/common/StateManager.cxx @@ -256,7 +256,7 @@ void StateManager::saveState(int slot) << ".st" << slot; // Make sure the file can be opened for writing - Serializer out(buf.str()); + Serializer out(buf.str(), Serializer::Mode::ReadWriteTrunc); if(!out) { buf.str(""); diff --git a/src/common/StateManager.hxx b/src/common/StateManager.hxx index 7d4775979..243063709 100644 --- a/src/common/StateManager.hxx +++ b/src/common/StateManager.hxx @@ -173,9 +173,11 @@ class StateManager // MD5 of the currently active ROM (either in movie or rewind mode) string myMD5; +#if 0 // Serializer classes used to save/load the eventstream Serializer myMovieWriter; Serializer myMovieReader; +#endif // Stored savestates to be later rewound unique_ptr myRewindManager;