Fixed joinging multiplayer game

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5373 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2010-05-04 01:02:56 +00:00
parent 7a23f394fc
commit d1ac9142a3
3 changed files with 5 additions and 4 deletions

View File

@@ -372,7 +372,7 @@ void InputManager::dispatchInput(Input::InputType type, int deviceID, int btnID,
else if (player == NULL)
{
// New player is joining
if (action == PA_FIRE)
if (action == PA_FIRE || action == PA_MENU_SELECT)
{
InputDevice *device = NULL;
if (type == Input::IT_KEYBOARD)

View File

@@ -76,10 +76,10 @@ public:
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void loadedFromFile();
/** Called when a player hits 'fire' on his device to join the game */
/** \brief Called when a player hits 'fire'/'select' on his device to join the game */
bool playerJoin(InputDevice* device, bool firstPlayer);
/** Called when a player hits 'rescue' on his device to leave the game */
/** \brief Called when a player hits 'rescue'/'cancel' on his device to leave the game */
bool playerQuit(StateManager::ActivePlayer* player);
/** \brief implement callback from parent class GUIEngine::Screen */

View File

@@ -315,7 +315,8 @@ void OptionsScreenInput2::eventCallback(Widget* widget, const std::string& name,
}
else
{
std::cerr << "unknown selection device in options : " << m_config->getName().c_str() << std::endl;
std::cerr << "unknown selection device in options : "
<< m_config->getName().c_str() << std::endl;
}
break;
}