Skip to content

Commit 92847b1

Browse files
author
feos
committed
Revert "tastudio: instead of capturing a tsm state after loading a branch, force greenzone creation when we're navigating past last greenzone frame"
This reverts commit ade701f.
1 parent b12b061 commit 92847b1

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs

+2-13
Original file line numberDiff line numberDiff line change
@@ -900,19 +900,8 @@ private void StartAtNearestFrameAndEmulate(int frame, bool fromLua, bool fromRew
900900

901901
_unpauseAfterSeeking = (fromRewinding || WasRecording) && !Mainform.EmulatorPaused;
902902
TastudioPlayMode();
903-
904-
// feos: if there is a state BETWEEN the current frame and the last valid (laglog) frame,
905-
// prefer the latter and use state prior to that. otherwise greenzone will never be appended
906-
// TODO: allow gaps in greenzone to overcome this
907-
// we don't want to wait for seeking to end if there are states in the middle of invalid greenzone
908-
// if there are such states, then we can navigate there, hence it's supposed to be a greenzone
909-
KeyValuePair<int, byte[]> closestState = CurrentTasMovie.TasStateManager
910-
.GetStateClosestToFrame(Math.Min(frame, CurrentTasMovie.LastValidFrame));
911-
912-
if (closestState.Value != null
913-
&& (frame < Emulator.Frame
914-
|| closestState.Key > Emulator.Frame
915-
|| CurrentTasMovie.LastValidFrame < Emulator.Frame))
903+
KeyValuePair<int, byte[]> closestState = CurrentTasMovie.TasStateManager.GetStateClosestToFrame(frame);
904+
if (closestState.Value != null && (frame < Emulator.Frame || closestState.Key > Emulator.Frame))
916905
{
917906
LoadState(closestState);
918907
}

0 commit comments

Comments
 (0)