Skip to content

Commit

Permalink
Map the B button to back on SDL menus
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Nov 6, 2022
1 parent 31340d2 commit f1e912b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SDL/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ void run_gui(bool is_running)
if (button == JOYPAD_BUTTON_A) {
event.key.keysym.scancode = SDL_SCANCODE_RETURN;
}
else if (button == JOYPAD_BUTTON_MENU) {
else if (button == JOYPAD_BUTTON_MENU || button == JOYPAD_BUTTON_B) {
event.key.keysym.scancode = SDL_SCANCODE_ESCAPE;
}
else if (button == JOYPAD_BUTTON_UP) event.key.keysym.scancode = SDL_SCANCODE_UP;
Expand Down

0 comments on commit f1e912b

Please sign in to comment.