From 269023f747824f2049fa631c7b0bbbd401e7e295 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 26 Jan 2004 23:08:46 +0000 Subject: [PATCH] fix editor jumping to odd positions in the music after going through options menus --- stepmania/src/ScreenEdit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 9321e726ec..d003a9d626 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1434,6 +1434,14 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) case SM_GainFocus: /* We do this ourself. */ SOUND->HandleSongTimer( false ); + + /* When another screen comes up, RageSounds takes over the sound timer. When we come + * back, put the timer back to where it was. */ + GAMESTATE->m_fSongBeat = m_fTrailingBeat; + break; + case SM_LoseFocus: + /* Snap the trailing beat, in case we lose focus while tweening. */ + m_fTrailingBeat = GAMESTATE->m_fSongBeat; break; } }