Add better savestate error handling.

Aborts when it can't load.
This commit is contained in:
Unknown W. Brackets committed 2013-04-13 01:39:17 -07:00
1 parent 117ffaeb60
commit fe97fd6fc5
7 files changed
+37 -8

No files matched your search

+7
View File
@@ -165,7 +165,10 @@ void __KernelDoState(PointerWrap &p)
std::string git_version = PPSSPP_GIT_VERSION;
p.Do(git_version);
if (git_version != PPSSPP_GIT_VERSION)
{
p.SetError(p.ERROR_WARNING);
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);
@@ -462,7 +465,11 @@ void KernelObjectPool::DoState(PointerWrap &p)
p.Do(_maxCount);
if (_maxCount != maxCount)
{
p.SetError(p.ERROR_FAILURE);
ERROR_LOG(HLE, "Unable to load state: different kernel object storage.");
return;
}
if (p.mode == p.MODE_READ)
{