JoinInput(MenuInput ) -> JoinInput(InputEventPlus)
This commit is contained in:
@@ -242,15 +242,15 @@ RString Screen::GetPrevScreen() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Screen::JoinInput( const MenuInput &MenuI )
|
bool Screen::JoinInput( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->PlayersCanJoin() )
|
if( !GAMESTATE->PlayersCanJoin() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( MenuI.IsValid() && MenuI.button==MENU_BUTTON_START )
|
if( input.MenuI.IsValid() && input.MenuI.button==MENU_BUTTON_START )
|
||||||
{
|
{
|
||||||
/* If this side is already in, don't re-join (and re-pay!). */
|
/* If this side is already in, don't re-join (and re-pay!). */
|
||||||
if(GAMESTATE->m_bSideIsJoined[pn])
|
if(GAMESTATE->m_bSideIsJoined[input.pn])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* subtract coins */
|
/* subtract coins */
|
||||||
@@ -267,7 +267,7 @@ bool Screen::JoinInput( const MenuInput &MenuI )
|
|||||||
if( GAMESTATE->GetNumSidesJoined() > 0 )
|
if( GAMESTATE->GetNumSidesJoined() > 0 )
|
||||||
SCREENMAN->PlayStartSound();
|
SCREENMAN->PlayStartSound();
|
||||||
|
|
||||||
GAMESTATE->JoinPlayer( pn );
|
GAMESTATE->JoinPlayer( input.pn );
|
||||||
|
|
||||||
// don't load memory card profiles here. It's slow and can cause a big skip.
|
// 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+,
|
/* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public:
|
|||||||
virtual ScreenType GetScreenType() const { return ALLOW_OPERATOR_MENU_BUTTON ? game_menu : system_menu; }
|
virtual ScreenType GetScreenType() const { return ALLOW_OPERATOR_MENU_BUTTON ? game_menu : system_menu; }
|
||||||
bool AllowOperatorMenuButton() const { return ALLOW_OPERATOR_MENU_BUTTON; }
|
bool AllowOperatorMenuButton() const { return ALLOW_OPERATOR_MENU_BUTTON; }
|
||||||
|
|
||||||
static bool JoinInput( const MenuInput &MenuI ); // return true if a player joined
|
static bool JoinInput( const InputEventPlus &input ); // return true if a player joined
|
||||||
|
|
||||||
//
|
//
|
||||||
// Lua
|
// Lua
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ void ScreenSelect::Input( const InputEventPlus &input )
|
|||||||
bool bAllowJoinInput = !ALLOW_DISABLED_PLAYER_INPUT;
|
bool bAllowJoinInput = !ALLOW_DISABLED_PLAYER_INPUT;
|
||||||
|
|
||||||
if( input.MenuI.button == MENU_BUTTON_COIN ||
|
if( input.MenuI.button == MENU_BUTTON_COIN ||
|
||||||
(bAllowJoinInput && Screen::JoinInput(input.MenuI)) )
|
(bAllowJoinInput && Screen::JoinInput(input)) )
|
||||||
{
|
{
|
||||||
if( input.type == IET_FIRST_PRESS )
|
if( input.type == IET_FIRST_PRESS )
|
||||||
this->UpdateSelectableChoices();
|
this->UpdateSelectableChoices();
|
||||||
|
|||||||
@@ -712,10 +712,10 @@ void ScreenSelectMaster::MenuStart( PlayerNumber pn )
|
|||||||
{
|
{
|
||||||
// If the player isn't already joined, try to join them.
|
// 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.
|
// Allow a player to join even if input is locked or someone has already already chosen.
|
||||||
MenuInput MenuI;
|
InputEventPlus input;
|
||||||
MenuI.player = pn;
|
input.pn = pn;
|
||||||
MenuI.button = MENU_BUTTON_START;
|
input.MenuI.button = MENU_BUTTON_START;
|
||||||
Screen::JoinInput( MenuI );
|
Screen::JoinInput( input );
|
||||||
|
|
||||||
if( m_fLockInputSecs > 0 )
|
if( m_fLockInputSecs > 0 )
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user