From 9d65ff798d6cf512f0d47d2f3c1529dd64cd4e0f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 22 Jul 2005 04:11:15 +0000 Subject: [PATCH] fix "record empty segment at end doesn't do anything useful" --- stepmania/src/ScreenEdit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index a6d56f8901..a851f78a7b 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1613,9 +1613,16 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ m_iStartPlayingAt = BeatToNoteRow( ftruncf(GAMESTATE->m_fSongBeat, g_iDefaultRecordLength.Get()) ); m_iStopPlayingAt = m_iStartPlayingAt + BeatToNoteRow( g_iDefaultRecordLength.Get() ); } + if( GAMESTATE->m_pCurSteps[0]->IsAnEdit() ) m_iStopPlayingAt = min( m_iStopPlayingAt, BeatToNoteRow(GetMaximumBeatForNewNote()) ); + if( m_iStartPlayingAt >= m_iStopPlayingAt ) + { + SCREENMAN->PlayInvalidSound(); + return; + } + TransitionEditState( STATE_RECORDING ); } break;