more attempts at fixing gamepad buttons

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3333 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-03-31 20:49:51 +00:00
parent 721348c2ce
commit 71f99430c1
2 changed files with 3 additions and 16 deletions

View File

@ -41,11 +41,7 @@ bool DeviceManager::mapInputToPlayerAndAction( Input::InputType type, int id0, i
{ {
return false; return false;
} }
else if(type == Input::IT_STICKBUTTON) else if(type == Input::IT_STICKBUTTON || type == Input::IT_STICKMOTION)
{
return false;
}
else if(type == Input::IT_STICKMOTION)
{ {
// std::cout << "stick motion, ID=" <<id0 << " axis=" << id1 << " value=" << value << std::endl; // std::cout << "stick motion, ID=" <<id0 << " axis=" << id1 << " value=" << value << std::endl;
for(unsigned int n=0; n<m_gamepad_amount; n++) for(unsigned int n=0; n<m_gamepad_amount; n++)

View File

@ -520,23 +520,14 @@ void InputManager::input()
input(Input::IT_STICKMOTION, ev.jaxis.which, ev.jaxis.axis, Input::AD_POSITIVE, value); input(Input::IT_STICKMOTION, ev.jaxis.which, ev.jaxis.axis, Input::AD_POSITIVE, value);
} }
break; break;
case SDL_JOYBUTTONUP: case SDL_JOYBUTTONUP:
/* TODO - bring gamepad back in, with new InputDevice interface
stickIndex = m_stick_infos[ev.jbutton.which]->m_index;
*/
// See the SDL_JOYAXISMOTION case label because of !m_mode thingie. // See the SDL_JOYAXISMOTION case label because of !m_mode thingie.
input(Input::IT_STICKBUTTON, ev.jbutton.which, input(Input::IT_STICKBUTTON, ev.jbutton.which,
ev.jbutton.button, 0, 0); ev.jbutton.button, 0, 0);
break; break;
case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONDOWN:
/* TODO - bring gamepad back in, with new InputDevice interface
stickIndex = m_stick_infos[ev.jbutton.which]->m_index;
*/
// See the SDL_JOYAXISMOTION case label because of !m_mode thingie. // See the SDL_JOYAXISMOTION case label because of !m_mode thingie.
input(Input::IT_STICKBUTTON, ev.jbutton.which, input(Input::IT_STICKBUTTON, ev.jbutton.which, ev.jbutton.button, 0, 32768);
ev.jbutton.button, 0, 32768);
break; break;
case SDL_USEREVENT: case SDL_USEREVENT:
// TODO - GUI countdown // TODO - GUI countdown