Skip to content

Commit

Permalink
Change scale with gamepad shoulder keys
Browse files Browse the repository at this point in the history
  • Loading branch information
twojstaryzdomu committed Jun 11, 2022
1 parent a86b7f0 commit daca24f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sys_sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,16 @@ static void handle_controllerbutton(int button, bool pressed, struct input_t *in
input->direction &= ~INPUT_DIRECTION_RIGHT;
}
break;
case SDL_CONTROLLER_BUTTON_LEFTSHOULDER:
if (pressed) {
sdl2_rescale_screen(-1);
}
break;
case SDL_CONTROLLER_BUTTON_RIGHTSHOULDER:
if (pressed) {
sdl2_rescale_screen(1);
}
break;
}
}

Expand Down

0 comments on commit daca24f

Please sign in to comment.