diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-10-08 07:16:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-10-08 07:16:19 +0400 |
commit | ce4162c9a13f8d147e898c625ffe1e10bca3b48d (patch) | |
tree | e178b605ed574fe8fcf24532f26ce13e24fe2144 /source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp | |
parent | b8c294d323551591a1140e3b73e03b996303eb81 (diff) |
* Joystick sensor is now only triggered from events of the selected type.
* Keyboard sensor - added (back?) support for qualifiers (Hold buttons in the UI)
Diffstat (limited to 'source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp')
-rw-r--r-- | source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp index 7a2ec5b3dea..89e2420f822 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp @@ -38,7 +38,7 @@ void SCA_Joystick::OnAxisMotion(SDL_Event* sdl_event) pFillAxes(); m_axisnum = sdl_event->jaxis.axis; m_axisvalue = sdl_event->jaxis.value; - m_istrig = 1; + m_istrig_axis = 1; } @@ -46,12 +46,12 @@ void SCA_Joystick::OnHatMotion(SDL_Event* sdl_event) { m_hatdir = sdl_event->jhat.value; m_hatnum = sdl_event->jhat.hat; - m_istrig = 1; + m_istrig_hat = 1; } void SCA_Joystick::OnButtonUp(SDL_Event* sdl_event) { - m_istrig = 1; + m_istrig_button = 1; /* this is needed for the "all events" option * so we know if there are no buttons pressed */ @@ -70,7 +70,7 @@ void SCA_Joystick::OnButtonDown(SDL_Event* sdl_event) { if(sdl_event->jbutton.button >= 0 || sdl_event->jbutton.button <= m_buttonmax) { - m_istrig = 1; + m_istrig_button = 1; m_buttonnum = sdl_event->jbutton.button; } } @@ -78,7 +78,7 @@ void SCA_Joystick::OnButtonDown(SDL_Event* sdl_event) void SCA_Joystick::OnNothing(SDL_Event* sdl_event) { - m_istrig = 0; + m_istrig_axis = m_istrig_button = m_istrig_hat = 0; } /* only handle events for 1 joystick */ |