From 03b6c41c674fbf14efad10d79a97a1719f26e7b1 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 5 Aug 2015 21:31:17 +0100 Subject: [PATCH 1/2] Add shorthand flag in SlxiSubChunkFlags for XSCF_IGNORABLE_UNKNOWN | XSCF_IGNORABLE_VERSION. --- src/saveload/extended_ver_sl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/saveload/extended_ver_sl.h b/src/saveload/extended_ver_sl.h index 3dffee5a7c..39a03478c2 100644 --- a/src/saveload/extended_ver_sl.h +++ b/src/saveload/extended_ver_sl.h @@ -75,6 +75,8 @@ enum SlxiSubChunkFlags { XSCF_IGNORABLE_VERSION = 1 << 1, ///< the loader is free to ignore this without aborting the load if the version is greater than the maximum that can be loaded XSCF_EXTRA_DATA_PRESENT = 1 << 2, ///< extra data field is present, extra data in some sub-chunk/feature specific format, not used for anything yet XSCF_CHUNK_ID_LIST_PRESENT = 1 << 3, ///< chunk ID list field is present, list of chunks which this sub-chunk/feature adds to the save game, this can be used to discard the chunks if the feature is unknown + + XSCF_IGNORABLE_ALL = XSCF_IGNORABLE_UNKNOWN | XSCF_IGNORABLE_VERSION, ///< all "ignorable" flags }; DECLARE_ENUM_AS_BIT_SET(SlxiSubChunkFlags) From e30d7c21649aa707faa4589d5d1ee98772353a29 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 7 Aug 2015 20:12:25 +0100 Subject: [PATCH 2/2] Save/load ext: Fix SlXvSetCurrentState being called before AfterLoadGame(). --- src/saveload/saveload.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 55a37f8ee8..74f6fba1e2 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -2467,8 +2467,6 @@ static inline void ClearSaveLoadState() delete _sl.lf; _sl.lf = NULL; - - SlXvSetCurrentState(); } /** @@ -2780,6 +2778,8 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check) GamelogStopAction(); } + SlXvSetCurrentState(); + return SL_OK; } @@ -2839,6 +2839,7 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode, Subdirectory sb, boo return SL_REINIT; } GamelogStopAction(); + SlXvSetCurrentState(); return SL_OK; }