Include the git version in savestates.

This way we can provide better warnings when it fails to load.
This commit is contained in:
Unknown W. Brackets committed 2013-04-13 01:13:28 -07:00
1 parent d586d7ddd2
commit 117ffaeb60
3 files changed
+19 -12

No files matched your search

+10 -4
View File
@@ -15,10 +15,11 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "HLE.h"
#include "../MIPS/MIPS.h"
#include "../MIPS/MIPSCodeUtils.h"
#include "../MIPS/MIPSInt.h"
#include "Core/Config.h"
#include "Core/HLE/HLE.h"
#include "Core/MIPS/MIPS.h"
#include "Core/MIPS/MIPSCodeUtils.h"
#include "Core/MIPS/MIPSInt.h"
#include "Common/LogManager.h"
#include "../FileSystems/FileSystem.h"
@@ -161,6 +162,11 @@ void __KernelShutdown()
void __KernelDoState(PointerWrap &p)
{
std::string git_version = PPSSPP_GIT_VERSION;
p.Do(git_version);
if (git_version != PPSSPP_GIT_VERSION)
WARN_LOG(HLE, "Warning: this savestate was generated by a different version of PPSSPP. It may not load properly.");
p.Do(kernelRunning);
kernelObjects.DoState(p);
p.DoMarker("KernelObjects");