Skip to content

Commit

Permalink
Map SDL_CONTROLLER_BUTTON_Y to Shoot + Run
Browse files Browse the repository at this point in the history
  • Loading branch information
usineur committed Apr 11, 2020
1 parent 0a79a81 commit 6ca3e20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions system_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,11 @@ void System_SDL2::processEvents() {
}
break;
case SDL_CONTROLLER_BUTTON_Y:
if (pressed) {
pad.mask |= SYS_INP_SHOOT | SYS_INP_RUN;
} else {
pad.mask &= ~SYS_INP_SHOOT & ~SYS_INP_RUN;
}
break;
case SDL_CONTROLLER_BUTTON_BACK:
inp.skip = pressed;
Expand Down

0 comments on commit 6ca3e20

Please sign in to comment.