diff options
Diffstat (limited to 'src/gui/sdlinput.cpp')
-rw-r--r-- | src/gui/sdlinput.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 9b8b1ec6a..f9ff0f618 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -171,6 +171,20 @@ void SDLInput::pushInput(const SDL_Event &event) break; } + case SDL_JOYBUTTONDOWN: + { + const InputActionT actionId = inputManager.getActionByKey(event); + if (actionId > InputAction::NO_VALUE) + { + keyInput.setActionId(actionId); + keyInput.setType(KeyEventType::PRESSED); + mKeyInputQueue.push(keyInput); + keyInput.setType(KeyEventType::RELEASED); + mKeyInputQueue.push(keyInput); + } + break; + } + #ifdef USE_SDL2 case SDL_TEXTINPUT: keyInput.setType(KeyEventType::PRESSED); |