mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02:00
Add better savestate error handling.
Aborts when it can't load.
This commit is contained in:
@@ -405,7 +405,11 @@ public:
|
||||
u32 numCallbacks = THREAD_CALLBACK_NUM_TYPES;
|
||||
p.Do(numCallbacks);
|
||||
if (numCallbacks != THREAD_CALLBACK_NUM_TYPES)
|
||||
ERROR_LOG(HLE, "Unable to load state: different kernel object storage.");
|
||||
{
|
||||
p.SetError(p.ERROR_FAILURE);
|
||||
ERROR_LOG(HLE, "Unable to load state: different thread callback storage.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < THREAD_CALLBACK_NUM_TYPES; ++i)
|
||||
{
|
||||
@@ -581,6 +585,7 @@ struct ThreadQueueList
|
||||
p.Do(numQueues);
|
||||
if (numQueues != NUM_QUEUES)
|
||||
{
|
||||
p.SetError(p.ERROR_FAILURE);
|
||||
ERROR_LOG(HLE, "Savestate loading error: invalid data");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user