Fix issues with savestates and non-buffered rendering

This commit is contained in:
Henrik Rydgård committed 2024-10-17 21:09:04 +02:00
1 parent 858f37b8fc
commit b43abd2015
4 files changed
+17 -8

No files matched your search

+10 -6
View File
@@ -913,25 +913,26 @@ namespace SaveState
return Status::SUCCESS;
}
void Process()
{
// NOTE: This can cause ending of the current renderpass, due to the readback needed for the screenshot.
bool Process() {
rewindStates.Process();
if (!needsProcess)
return;
return false;
needsProcess = false;
if (!__KernelIsRunning())
{
ERROR_LOG(Log::SaveState, "Savestate failure: Unable to load without kernel, this should never happen.");
return;
return false;
}
std::vector<Operation> operations = Flush();
SaveStart state;
for (size_t i = 0, n = operations.size(); i < n; ++i)
{
bool readbackImage = false;
for (size_t i = 0, n = operations.size(); i < n; ++i) {
Operation &op = operations[i];
CChunkFileReader::Error result;
Status callbackResult;
@@ -1068,6 +1069,7 @@ namespace SaveState
} else {
screenshotFailures = 0;
}
readbackImage = true;
break;
}
default:
@@ -1083,6 +1085,8 @@ namespace SaveState
// Avoid triggering frame skipping due to slowdown
__DisplaySetWasPaused();
}
return readbackImage;
}
void NotifySaveData() {