diff --git a/src/Etterna/Screen/Others/ScreenSelectMusic.cpp b/src/Etterna/Screen/Others/ScreenSelectMusic.cpp index 331bfc9d8e..f07e263cca 100644 --- a/src/Etterna/Screen/Others/ScreenSelectMusic.cpp +++ b/src/Etterna/Screen/Others/ScreenSelectMusic.cpp @@ -520,6 +520,7 @@ ScreenSelectMusic::Input(const InputEventPlus& input) return true; } else if (bHoldingCtrl && c == 'P' && m_MusicWheel.IsSettled() && input.type == IET_FIRST_PRESS) { + ScreenTextEntry::s_bMustResetInputRedirAtClose = true; ScreenTextEntry::TextEntry( SM_BackFromNamePlaylist, NAME_PLAYLIST, "", 128); MESSAGEMAN->Broadcast("DisplayAll"); @@ -1079,22 +1080,24 @@ ScreenSelectMusic::HandleScreenMessage(const ScreenMessage& SM) // restart preview music after finishing or cancelling playlist creation // this is just copypasta'd and should be made a function? or we have // something better? idk - GameSoundManager::PlayMusicParams PlayParams; - PlayParams.sFile = HandleLuaMusicFile(m_sSampleMusicToPlay); - PlayParams.pTiming = m_pSampleMusicTimingData; - PlayParams.bForceLoop = SAMPLE_MUSIC_LOOPS; - PlayParams.fStartSecond = m_fSampleStartSeconds; - PlayParams.fLengthSeconds = m_fSampleLengthSeconds; - PlayParams.fFadeOutLengthSeconds = SAMPLE_MUSIC_FADE_OUT_SECONDS; - PlayParams.bAlignBeat = ALIGN_MUSIC_BEATS; - PlayParams.bApplyMusicRate = true; - PlayParams.bAccurateSync = false; - GameSoundManager::PlayMusicParams FallbackMusic; - FallbackMusic.sFile = m_sLoopMusicPath; - FallbackMusic.fFadeInLengthSeconds = - SAMPLE_MUSIC_FALLBACK_FADE_IN_SECONDS; - FallbackMusic.bAlignBeat = ALIGN_MUSIC_BEATS; - SOUND->PlayMusic(PlayParams); + if (!m_sSampleMusicToPlay.empty()) { + GameSoundManager::PlayMusicParams PlayParams; + PlayParams.sFile = HandleLuaMusicFile(m_sSampleMusicToPlay); + PlayParams.pTiming = m_pSampleMusicTimingData; + PlayParams.bForceLoop = SAMPLE_MUSIC_LOOPS; + PlayParams.fStartSecond = m_fSampleStartSeconds; + PlayParams.fLengthSeconds = m_fSampleLengthSeconds; + PlayParams.fFadeOutLengthSeconds = SAMPLE_MUSIC_FADE_OUT_SECONDS; + PlayParams.bAlignBeat = ALIGN_MUSIC_BEATS; + PlayParams.bApplyMusicRate = true; + PlayParams.bAccurateSync = false; + GameSoundManager::PlayMusicParams FallbackMusic; + FallbackMusic.sFile = m_sLoopMusicPath; + FallbackMusic.fFadeInLengthSeconds = + SAMPLE_MUSIC_FALLBACK_FADE_IN_SECONDS; + FallbackMusic.bAlignBeat = ALIGN_MUSIC_BEATS; + SOUND->PlayMusic(PlayParams); + } GAMESTATE->SetPaused(false); MESSAGEMAN->Broadcast("PlayingSampleMusic"); }