mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 02:39:05 +02:00
SaveState: Report failed writes, and call back on network refusals
- A failed final flush (a full disk) or a failed rename into place was reported as "Saved State". A failed load undo rename still pointed load undo at the current game, while the file was another game's state. - Refusing a save or load for being online didn't call the callback, unlike every other refusal. - A rewind dropped after its decode started stayed active, and stopped rewind snapshots until the next clear. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f45f4d5c85
commit
3cc61d3f8e
5 files changed
+33
-4
No files matched your search
@@ -161,6 +161,16 @@ CChunkFileReader::Error StateRingbuffer::Restore(std::string *errorString, std::
|
||||
return FinishRestore(errorString, metadata);
|
||||
}
|
||||
|
||||
void StateRingbuffer::CancelRestore() {
|
||||
if (!restoreActive_) {
|
||||
return;
|
||||
}
|
||||
// The decode may still be running into restoreBuffer_.
|
||||
WaitForWorker();
|
||||
restoreActive_ = false;
|
||||
std::vector<u8>().swap(restoreBuffer_);
|
||||
}
|
||||
|
||||
// Only moves the ring back: the state's buffer may still be in use by a worker job, and is reused
|
||||
// by the next snapshot anyway.
|
||||
void StateRingbuffer::DropNewest() {
|
||||
|
||||
Reference in new issue
Block a user