Provide action for the extra mouse buttons

This commit is contained in:
brunoais 2021-04-12 10:15:33 +01:00
parent 75ce0b5c3f
commit fd9a218828

View file

@ -661,6 +661,15 @@ input_manager_process_mouse_button(struct input_manager *im,
if (!im->forward_all_clicks) {
int action = down ? ACTION_DOWN : ACTION_UP;
if (control && event->button == SDL_BUTTON_X1) {
action_app_switch(im->controller, action);
return;
}
if (control && event->button == SDL_BUTTON_X2) {
expand_notification_panel(im->controller);
return;
}
if (control && event->button == SDL_BUTTON_RIGHT) {
press_back_or_turn_screen_on(im->controller, action);
return;