Core: Save movie state before video backend state

Fixes the old frame number/inputs being displayed after loading state.
This commit is contained in:
Stenzek 2019-06-30 00:24:41 +10:00
parent 560074cf9f
commit 63358adfb1
1 changed files with 5 additions and 2 deletions

View File

@ -170,6 +170,11 @@ static void DoState(PointerWrap& p)
return;
}
// Movie must be done before the video backend, because the window is redrawn in the video backend
// state load, and the frame number must be up-to-date.
Movie::DoState(p);
p.DoMarker("Movie");
// Begin with video backend, so that it gets a chance to clear its caches and writeback modified
// things to RAM
g_video_backend->DoState(p);
@ -186,8 +191,6 @@ static void DoState(PointerWrap& p)
if (SConfig::GetInstance().bWii)
Wiimote::DoState(p);
p.DoMarker("Wiimote");
Movie::DoState(p);
p.DoMarker("Movie");
Gecko::DoState(p);
p.DoMarker("Gecko");