From 04401ca365e08ea76a1a831e0ba712f8c8b6cbd6 Mon Sep 17 00:00:00 2001 From: Yauhen Artsiukhou Date: Sat, 22 Mar 2025 01:03:07 +0100 Subject: [PATCH] Ask screen handler to do a transition Closes: #553 --- src/ScreenEvaluation.cpp | 3 ++- src/ScreenGameplay.cpp | 11 ++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index d8d6dc8b62..5b8299b899 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -804,8 +804,9 @@ bool ScreenEvaluation::MenuStart( const InputEventPlus &input ) bool ScreenEvaluation::MenuRestart( const InputEventPlus &input ) { - if( IsTransitioning() ) + if (IsTransitioning()) { return false; + } SCREENMAN->GetTopScreen()->SetNextScreenName("ScreenGameplay"); StartTransitioningScreen( SM_GoToNextScreen ); diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 7b706e3cb0..91434e4d85 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -856,15 +856,12 @@ bool ScreenGameplay::Center1Player() const bool ScreenGameplay::MenuRestart( const InputEventPlus &input ) { - if( IsTransitioning() ) + if (IsTransitioning()) { return false; + } - m_DancingState = STATE_OUTRO; - m_pSoundMusic->StopPlaying(); - m_GameplayAssist.StopPlaying(); // Stop any queued assist ticks. - - SCREENMAN->GetTopScreen()->SetNextScreenName("ScreenGameplay"); - m_Cancel.StartTransitioning( SM_GoToNextScreen ); + SCREENMAN->GetTopScreen()->SetPrevScreenName("ScreenGameplay"); + BeginBackingOutFromGameplay(); return true; }