diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs index ac0cf5d8a8d..f86bf776b9e 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs @@ -59,7 +59,7 @@ public void GoToFrame(int frame, bool fromLua = false, bool fromRewinding = fals var lastState = GetPriorStateForFramebuffer(frame); if (lastState.Key > Emulator.Frame) { - LoadState(lastState); + LoadState(lastState, true); } StartSeeking(frame); diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index f61f20a2c4c..d5037e8589f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -932,7 +932,7 @@ private void StartAtNearestFrameAndEmulate(int frame, bool fromLua, bool fromRew var closestState = GetPriorStateForFramebuffer(frame); if (closestState.Value.Length > 0 && (frame < Emulator.Frame || closestState.Key > Emulator.Frame)) { - LoadState(closestState); + LoadState(closestState, true); } closestState.Value.Dispose(); @@ -980,7 +980,7 @@ private void StartAtNearestFrameAndEmulate(int frame, bool fromLua, bool fromRew } } - public void LoadState(KeyValuePair state) + public void LoadState(KeyValuePair state, bool discardApiHawkSurfaces = false) { StatableEmulator.LoadStateBinary(new BinaryReader(state.Value)); @@ -990,6 +990,10 @@ public void LoadState(KeyValuePair state) } UpdateTools(); + if (discardApiHawkSurfaces) + { + DisplayManager.DiscardApiHawkSurfaces(); + } } public void AddBranchExternal() => BookMarkControl.AddBranchExternal();