Save states: Fixed serializer class to avoid breaking save states every time a new value need to be added
This commit is contained in:
parent
42379b26d1
commit
a36708fe7b
3 changed files with 4 additions and 4 deletions
|
@ -124,7 +124,7 @@ bool SaveStateManager::LoadState(istream &stream, bool hashCheckRequired)
|
|||
}
|
||||
|
||||
stream.read((char*)&fileFormatVersion, sizeof(fileFormatVersion));
|
||||
if(fileFormatVersion < 1) {
|
||||
if(fileFormatVersion < 2) {
|
||||
MessageManager::DisplayMessage("SaveStates", "SaveStateIncompatibleVersion");
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -14,7 +14,7 @@ private:
|
|||
string GetStateFilepath(int stateIndex);
|
||||
|
||||
public:
|
||||
static constexpr uint32_t FileFormatVersion = 1;
|
||||
static constexpr uint32_t FileFormatVersion = 2;
|
||||
|
||||
SaveStateManager(shared_ptr<Console> console);
|
||||
|
||||
|
|
|
@ -196,9 +196,9 @@ void Serializer::RecursiveStream(T &value, T2&... args)
|
|||
template<typename... T>
|
||||
void Serializer::Stream(T&... args)
|
||||
{
|
||||
//StreamStartBlock();
|
||||
StreamStartBlock();
|
||||
RecursiveStream(args...);
|
||||
//StreamEndBlock();
|
||||
StreamEndBlock();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Reference in a new issue