From 63358adfb144f9a935a819358bc73e3769eaea8c Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 30 Jun 2019 00:24:41 +1000 Subject: [PATCH] Core: Save movie state before video backend state Fixes the old frame number/inputs being displayed after loading state. --- Source/Core/Core/State.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 1350fa9b09..cd4544b8f1 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -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");