Skip to content

Commit

Permalink
#1220: show game menu Pause Menu pressed on XBox One controller
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed Nov 9, 2020
1 parent 4b79e7d commit 9ec7eb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/system/sdl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,12 @@ static void processJoysticks()
gamepad->x = SDL_JoystickGetButton(joystick, 2);
gamepad->y = SDL_JoystickGetButton(joystick, 3);

for(s32 i = 5; i < numButtons; i++)
if(numButtons >= 8)
{
s32 back = SDL_JoystickGetButton(joystick, i);
// !TODO: We have to find a better way to handle gamepad MENU button
// atm we show game menu for only Pause Menu button on XBox one controller
// issue #1220
s32 back = SDL_JoystickGetButton(joystick, 7);

if(back)
{
Expand Down

0 comments on commit 9ec7eb7

Please sign in to comment.