diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 4d40aa60c4..b27839c813 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -236,13 +236,13 @@ RString Screen::GetPrevScreen() const } -bool Screen::JoinInput( const InputEventPlus &input ) +bool Screen::JoinInput( PlayerNumber pn ) { if( !GAMESTATE->PlayersCanJoin() ) return false; /* If this side is already in, don't re-join (and re-pay!). */ - if(GAMESTATE->m_bSideIsJoined[input.pn]) + if(GAMESTATE->m_bSideIsJoined[pn]) return false; /* subtract coins */ @@ -259,7 +259,7 @@ bool Screen::JoinInput( const InputEventPlus &input ) if( GAMESTATE->GetNumSidesJoined() > 0 ) SCREENMAN->PlayStartSound(); - GAMESTATE->JoinPlayer( input.pn ); + GAMESTATE->JoinPlayer( pn ); // don't load memory card profiles here. It's slow and can cause a big skip. /* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+, diff --git a/stepmania/src/Screen.h b/stepmania/src/Screen.h index a4c53e0d27..af3aa1380a 100644 --- a/stepmania/src/Screen.h +++ b/stepmania/src/Screen.h @@ -61,7 +61,7 @@ public: virtual ScreenType GetScreenType() const { return ALLOW_OPERATOR_MENU_BUTTON ? game_menu : system_menu; } bool AllowOperatorMenuButton() const { return ALLOW_OPERATOR_MENU_BUTTON; } - static bool JoinInput( const InputEventPlus &input ); // return true if a player joined + static bool JoinInput( PlayerNumber pn ); // return true if player joined // // Lua diff --git a/stepmania/src/ScreenSelect.cpp b/stepmania/src/ScreenSelect.cpp index 4566d064f9..f64069bf8b 100644 --- a/stepmania/src/ScreenSelect.cpp +++ b/stepmania/src/ScreenSelect.cpp @@ -150,7 +150,7 @@ void ScreenSelect::Input( const InputEventPlus &input ) bool bAllowJoinInput = !ALLOW_DISABLED_PLAYER_INPUT; if( input.MenuI == MENU_BUTTON_COIN || - (bAllowJoinInput && input.MenuI == MENU_BUTTON_START && Screen::JoinInput(input)) ) + (bAllowJoinInput && input.MenuI == MENU_BUTTON_START && Screen::JoinInput(input.pn)) ) { if( input.type == IET_FIRST_PRESS ) this->UpdateSelectableChoices(); diff --git a/stepmania/src/ScreenSelectMaster.cpp b/stepmania/src/ScreenSelectMaster.cpp index f4a7075295..98229012c8 100644 --- a/stepmania/src/ScreenSelectMaster.cpp +++ b/stepmania/src/ScreenSelectMaster.cpp @@ -712,10 +712,7 @@ void ScreenSelectMaster::MenuStart( PlayerNumber pn ) { // If the player isn't already joined, try to join them. // Allow a player to join even if input is locked or someone has already already chosen. - InputEventPlus input; - input.pn = pn; - input.MenuI = MENU_BUTTON_START; - Screen::JoinInput( input ); + Screen::JoinInput( pn ); if( m_fLockInputSecs > 0 ) return;