I'm not sure what was happening here:
If ALLOW_DISABLED_PLAYER_INPUT is true (only ScreenTitleMenu), then
ScreenSelect::Input doesn't do JoinInput ("the player will be joined
and the user will still be on the title menu"). However,
ScreenSelectMaster::MenuStart does the JoinInput anyway, so this still
happens.
If we want to have main menu options that don't load a screen, this
code path should be refactored a bit, to ask the derived class whether
the selection should also join. As is, it's just making the JoinInput
path complicated.
This commit is contained in:
@@ -142,12 +142,7 @@ void ScreenSelect::Input( const InputEventPlus &input )
|
|||||||
if( input.MenuI == MENU_BUTTON_COIN && input.type == IET_FIRST_PRESS )
|
if( input.MenuI == MENU_BUTTON_COIN && input.type == IET_FIRST_PRESS )
|
||||||
this->UpdateSelectableChoices();
|
this->UpdateSelectableChoices();
|
||||||
|
|
||||||
// HACK: Don't process JoinInput on the TitleMenu. Otherwise, if the user presses start
|
if( input.MenuI == MENU_BUTTON_START && Screen::JoinInput(input.pn) )
|
||||||
// on a choice that doesn't move to a new screen, the player will be joined and the
|
|
||||||
// user will still be on the title menu.
|
|
||||||
bool bAllowJoinInput = !ALLOW_DISABLED_PLAYER_INPUT;
|
|
||||||
|
|
||||||
if( bAllowJoinInput && input.MenuI == MENU_BUTTON_START && Screen::JoinInput(input.pn) )
|
|
||||||
{
|
{
|
||||||
if( input.type == IET_FIRST_PRESS )
|
if( input.type == IET_FIRST_PRESS )
|
||||||
this->UpdateSelectableChoices();
|
this->UpdateSelectableChoices();
|
||||||
|
|||||||
@@ -714,10 +714,6 @@ void ScreenSelectMaster::MenuStart( const InputEventPlus &input )
|
|||||||
return;
|
return;
|
||||||
PlayerNumber pn = input.pn;
|
PlayerNumber pn = input.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.
|
|
||||||
Screen::JoinInput( pn );
|
|
||||||
|
|
||||||
if( m_fLockInputSecs > 0 )
|
if( m_fLockInputSecs > 0 )
|
||||||
return;
|
return;
|
||||||
if( m_bChosen[pn] )
|
if( m_bChosen[pn] )
|
||||||
|
|||||||
Reference in New Issue
Block a user