diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 60be07f21b..289e11b8ae 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1107,7 +1107,7 @@ float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusi } -void ScreenGameplay::PauseGame( bool bPause ) +void ScreenGameplay::PauseGame( bool bPause, GameController gc ) { if( m_bPaused == bPause ) { @@ -1122,6 +1122,8 @@ void ScreenGameplay::PauseGame( bool bPause ) AbortGiveUp( false ); m_bPaused = bPause; + m_PauseController = gc; + m_pSoundMusic->Pause( bPause ); if( bPause ) this->PlayCommand( "Pause" ); @@ -1733,8 +1735,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ if( m_bPaused ) { /* If we're paused, only accept MENU_BUTTON_START to unpause. */ - if( MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && type == IET_FIRST_PRESS ) - this->PauseGame( false ); + if( MenuI.IsValid() && GAMESTATE->IsHumanPlayer(MenuI.player) && MenuI.button == MENU_BUTTON_START && type == IET_FIRST_PRESS ) + { + if( m_PauseController == GAME_CONTROLLER_INVALID || m_PauseController == GameI.controller ) + this->PauseGame( false ); + } return; } diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 4ae99c6146..a7e75ffec6 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -61,7 +61,7 @@ protected: void LoadNextSong(); void LoadCourseSongNumber( int SongNumber ); float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic); - void PauseGame( bool bPause ); + void PauseGame( bool bPause, GameController gc = GAME_CONTROLLER_INVALID ); void ShowSavePrompt( ScreenMessage SM_SendWhenDone ); void PlayAnnouncer( CString type, float fSeconds ); void UpdateLights(); @@ -82,6 +82,7 @@ protected: NUM_DANCING_STATES } m_DancingState; bool m_bPaused; + GameController m_PauseController; vector m_apSongsQueue; // size may be >1 if playing a course vector m_vpStepsQueue[NUM_PLAYERS]; // size may be >1 if playing a course vector m_asModifiersQueue[NUM_PLAYERS];// size may be >1 if playing a course