Savestate: Reset video frame tracking and ME busy time on load

Neither is serialized, and both went stale on load. The ME busy time was
measured against the pre-load clock, so loading an earlier state made the
next SAS/codec job wait until the old time came around, freezing the game.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-28 09:36:48 -06:00
1 parent 8d62ae04dd
commit 40a70b004c
2 files changed
+8

No files matched your search

+5
View File
@@ -187,6 +187,11 @@ void __VideocodecShutdown() {
}
void __VideocodecDoState(PointerWrap &p) {
if (p.mode == p.MODE_READ) {
// Not serialized, and the clock it was measured against just moved (maybe backwards).
g_meBusyUntilUs = 0;
}
auto s = p.Section("sceVideocodec", 0, 1);
if (!s) {
return;