Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <hikerstk@us...> - 2010-11-28 11:39:15
|
Revision: 6740 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6740&view=rev Author: hikerstk Date: 2010-11-28 11:39:09 +0000 (Sun, 28 Nov 2010) Log Message: ----------- Fixed continuous warnings message "Ignoring '...', you needed to join earlier to play!" This is caused by polling the joystick device, and the joystick events triggering the message. For now the message is not printed if the joystick value is inside the deadzone value for the joystick (this means that the deadzone is tested at two locations - once in input manager to avoid the message, once in input_device - but the latter is not triggered in this case since player is NULL). Not ideal, so a better solution would be welcome. Modified Paths: -------------- main/trunk/src/input/input_manager.cpp Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-11-28 11:28:07 UTC (rev 6739) +++ main/trunk/src/input/input_manager.cpp 2010-11-28 11:39:09 UTC (rev 6740) @@ -485,7 +485,8 @@ { GamePadDevice* gp = getDeviceList()->getGamePadFromIrrID(deviceID); - if (gp != NULL) + if (gp != NULL && + abs(value)>gp->m_deadzone) { //I18N: message shown when an input device is used but is not associated to any player GUIEngine::showMessage(StringUtils::insertValues(_("Ignoring '%s', you needed to join earlier to play!"), @@ -575,11 +576,7 @@ event.JoystickEvent.Joystick, axis_id, value); } - // FIXME - AD_NEGATIVE/AD_POSITIVE are probably useless since value contains that info too -// if (value < 0) dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, axis_id, Input::AD_NEUTRAL, value); -// else -// dispatchInput(Input::IT_STICKMOTION, event.JoystickEvent.Joystick, axis_id, Input::AD_POSITIVE, value); } GamePadDevice* gp = getDeviceList()->getGamePadFromIrrID(event.JoystickEvent.Joystick); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |