truncated state files (fixes #875)

This commit is contained in:
Thomas Jentzsch 2022-02-23 21:21:01 +01:00
parent cd586b92e3
commit 7e9837b576
2 changed files with 3 additions and 1 deletions

View File

@ -256,7 +256,7 @@ void StateManager::saveState(int slot)
<< ".st" << slot; << ".st" << slot;
// Make sure the file can be opened for writing // Make sure the file can be opened for writing
Serializer out(buf.str()); Serializer out(buf.str(), Serializer::Mode::ReadWriteTrunc);
if(!out) if(!out)
{ {
buf.str(""); buf.str("");

View File

@ -173,9 +173,11 @@ class StateManager
// MD5 of the currently active ROM (either in movie or rewind mode) // MD5 of the currently active ROM (either in movie or rewind mode)
string myMD5; string myMD5;
#if 0
// Serializer classes used to save/load the eventstream // Serializer classes used to save/load the eventstream
Serializer myMovieWriter; Serializer myMovieWriter;
Serializer myMovieReader; Serializer myMovieReader;
#endif
// Stored savestates to be later rewound // Stored savestates to be later rewound
unique_ptr<RewindManager> myRewindManager; unique_ptr<RewindManager> myRewindManager;