From 2cef59ffd246de4261144a8a345651cc78178db0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 18 Oct 2002 00:58:21 +0000 Subject: [PATCH] Now that I've done all that, I can fix this: don't leave the cursor before the beginning of the song when escaping from play and edit. --- stepmania/src/ScreenEdit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 55e4115d69..3c80096bf7 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1398,6 +1398,10 @@ void ScreenEdit::TransitionToEdit() /* Make sure we're snapped. */ GAMESTATE->m_fSongBeat = froundf( GAMESTATE->m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetSnapMode()) ); + + /* Playing and recording have lead-ins, which may start before beat 0; + * make sure we don't stay there if we escaped out early. */ + GAMESTATE->m_fSongBeat = max( GAMESTATE->m_fSongBeat, 0 ); } void ScreenEdit::TransitionFromRecordToEdit()