Permalink
Browse files

add left and right thumbstick button handling in SDL gamepad.

  • Loading branch information...
1 parent 9c08b60 commit d6b81236626f6b8953a94b8d955f7500eb029219 @Bigpet Bigpet committed Nov 20, 2016
Showing with 4 additions and 0 deletions.
  1. +4 −0 SDL/SDLJoystick.cpp
View
@@ -108,6 +108,10 @@ keycode_t SDLJoystick::getKeycodeForButton(SDL_GameControllerButton button) {
return NKCODE_BUTTON_9; // select button
case SDL_CONTROLLER_BUTTON_GUIDE:
return NKCODE_BACK; // pause menu
+ case SDL_CONTROLLER_BUTTON_LEFTSTICK:
+ return NKCODE_BUTTON_THUMBL;
+ case SDL_CONTROLLER_BUTTON_RIGHTSTICK:
+ return NKCODE_BUTTON_THUMBR;
}
return NKCODE_UNKNOWN;
}

0 comments on commit d6b8123

Please sign in to comment.