Skip to content

Commit

Permalink
add left and right thumbstick button handling in SDL gamepad.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bigpet committed Nov 20, 2016
1 parent 9c08b60 commit d6b8123
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SDL/SDLJoystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d6b8123

Please sign in to comment.