diff options
author | RichieSams | 2013-09-17 11:04:41 -0500 |
---|---|---|
committer | RichieSams | 2013-09-17 11:04:41 -0500 |
commit | 6148a0a878eb543731653870fcb369a8c86a2dfc (patch) | |
tree | e0252b867ef83635770d5be322a13ea732e02735 | |
parent | 6664f31ed24b2d8b384221faffdeb6eda0f69835 (diff) | |
download | scummvm-rg350-6148a0a878eb543731653870fcb369a8c86a2dfc.tar.gz scummvm-rg350-6148a0a878eb543731653870fcb369a8c86a2dfc.tar.bz2 scummvm-rg350-6148a0a878eb543731653870fcb369a8c86a2dfc.zip |
ZVISION: Add a check against reading newer save game versions
-rw-r--r-- | engines/zvision/save_manager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/zvision/save_manager.cpp b/engines/zvision/save_manager.cpp index cf2d96575e..e09d31557a 100644 --- a/engines/zvision/save_manager.cpp +++ b/engines/zvision/save_manager.cpp @@ -27,6 +27,8 @@ #include "graphics/surface.h" #include "graphics/thumbnail.h" +#include "gui/message.h" + #include "zvision/save_manager.h" #include "zvision/zvision.h" #include "zvision/script_manager.h" @@ -163,6 +165,13 @@ bool SaveManager::readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hea // Read in the version header.version = in->readByte(); + // Check that the save version isn't newer than this binary + if (header.version > SAVE_VERSION) { + uint tempVersion = header.version; + GUI::MessageDialog dialog(Common::String::format("This save file uses version %u, but this engine only supports up to version %d. You will need an updated version of the engine to use this save file.", tempVersion, SAVE_VERSION), "OK"); + dialog.runModal(); + } + // Read in the save name header.saveName.clear(); char ch; |