summaryrefslogtreecommitdiff
path: root/src/input/joystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/joystick.cpp')
-rw-r--r--src/input/joystick.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index 3a4a47fb1..1e375cb0a 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -341,6 +341,11 @@ void Joystick::update()
mKeyTimeMap, InputType::JOYSTICK);
}
+bool Joystick::isActionEvent(const SDL_Event &event)
+{
+ return getButtonFromEvent(event) >= 0;
+}
+
KeysVector *Joystick::getActionVector(const SDL_Event &event)
{
const int i = getButtonFromEvent(event);