mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Add better savestate error handling.
Aborts when it can't load.
This commit is contained in:
1 parent
117ffaeb60
commit
fe97fd6fc5
7 files changed
+37
-8
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user