Bugfix: my previous commit to sdldrv made it impossible to
select a joystick axis in the option menu. Instead applied patch by samjam (forum) which fixes the original issue. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2817 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e39dd53795
commit
43042a63a9
@ -18,6 +18,8 @@ SuperTuxKart 0.6
|
|||||||
* Improved shortcut-detection
|
* Improved shortcut-detection
|
||||||
* Initial work towards networking (disabled and hidden by default)
|
* Initial work towards networking (disabled and hidden by default)
|
||||||
* Bug fixes and code refactor/cleanup/documentation
|
* Bug fixes and code refactor/cleanup/documentation
|
||||||
|
- Fixed 'joystick locks' (kart would turn even if the joystick is in neutral),
|
||||||
|
thanks to Samjam for the patch.
|
||||||
|
|
||||||
SuperTuxKart 0.5 (May 2008)
|
SuperTuxKart 0.5 (May 2008)
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -529,6 +529,10 @@ void SDLDriver::input()
|
|||||||
// joysticks can be used to control the menu.
|
// joysticks can be used to control the menu.
|
||||||
if(ev.jaxis.value <= -stickInfos[ev.jaxis.which]->m_deadzone)
|
if(ev.jaxis.value <= -stickInfos[ev.jaxis.which]->m_deadzone)
|
||||||
{
|
{
|
||||||
|
if (stickInfos[ev.jaxis.which]
|
||||||
|
->m_prevAxisDirections[ev.jaxis.axis] == AD_POSITIVE)
|
||||||
|
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
||||||
|
ev.jaxis.axis, AD_POSITIVE, 0);
|
||||||
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
||||||
ev.jaxis.axis, AD_NEGATIVE, -ev.jaxis.value);
|
ev.jaxis.axis, AD_NEGATIVE, -ev.jaxis.value);
|
||||||
stickInfos[ev.jaxis.which]->m_prevAxisDirections[ev.jaxis.axis]
|
stickInfos[ev.jaxis.which]->m_prevAxisDirections[ev.jaxis.axis]
|
||||||
@ -536,6 +540,10 @@ void SDLDriver::input()
|
|||||||
}
|
}
|
||||||
else if(ev.jaxis.value >= stickInfos[ev.jaxis.which]->m_deadzone)
|
else if(ev.jaxis.value >= stickInfos[ev.jaxis.which]->m_deadzone)
|
||||||
{
|
{
|
||||||
|
if (stickInfos[ev.jaxis.which]
|
||||||
|
->m_prevAxisDirections[ev.jaxis.axis] == AD_NEGATIVE)
|
||||||
|
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
||||||
|
ev.jaxis.axis, AD_NEGATIVE, 0);
|
||||||
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
||||||
ev.jaxis.axis, AD_POSITIVE, ev.jaxis.value);
|
ev.jaxis.axis, AD_POSITIVE, ev.jaxis.value);
|
||||||
stickInfos[ev.jaxis.which]->m_prevAxisDirections[ev.jaxis.axis]
|
stickInfos[ev.jaxis.which]->m_prevAxisDirections[ev.jaxis.axis]
|
||||||
@ -563,11 +571,11 @@ void SDLDriver::input()
|
|||||||
if (stickInfos[ev.jaxis.which]
|
if (stickInfos[ev.jaxis.which]
|
||||||
->m_prevAxisDirections[ev.jaxis.axis] == AD_NEGATIVE)
|
->m_prevAxisDirections[ev.jaxis.axis] == AD_NEGATIVE)
|
||||||
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
||||||
ev.jaxis.axis, AD_NEGATIVE, 1);
|
ev.jaxis.axis, AD_NEGATIVE, 0);
|
||||||
else if (stickInfos[ev.jaxis.which]
|
else if (stickInfos[ev.jaxis.which]
|
||||||
->m_prevAxisDirections[ev.jaxis.axis] == AD_POSITIVE)
|
->m_prevAxisDirections[ev.jaxis.axis] == AD_POSITIVE)
|
||||||
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
input(IT_STICKMOTION, !mode ? 0 : stickIndex,
|
||||||
ev.jaxis.axis, AD_POSITIVE, 1);
|
ev.jaxis.axis, AD_POSITIVE, 0);
|
||||||
|
|
||||||
stickInfos[ev.jaxis.which]->m_prevAxisDirections[ev.jaxis.axis]
|
stickInfos[ev.jaxis.which]->m_prevAxisDirections[ev.jaxis.axis]
|
||||||
= AD_NEUTRAL;
|
= AD_NEUTRAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user