Skip to content

Commit

Permalink
Forward DOWN and UP separately for middle-click
Browse files Browse the repository at this point in the history
As a consequence of this change, the HOME button is now handled by
Android on mouse released. This is consistent with the keyboard shortcut
(MOD+h) behavior.

PR #2259 <#2259>
Refs #2258 <#2258>
  • Loading branch information
rom1v committed Apr 17, 2021
1 parent 8cc057c commit 964b6d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,16 +647,16 @@ input_manager_process_mouse_button(struct input_manager *im,

bool down = event->type == SDL_MOUSEBUTTONDOWN;
if (!im->forward_all_clicks) {
int action = down ? ACTION_DOWN : ACTION_UP;

if (control && event->button == SDL_BUTTON_RIGHT) {
if (down) {
press_back_or_turn_screen_on(im->controller);
}
return;
}
if (control && event->button == SDL_BUTTON_MIDDLE) {
if (down) {
action_home(im->controller, ACTION_DOWN | ACTION_UP);
}
action_home(im->controller, action);
return;
}

Expand Down

0 comments on commit 964b6d2

Please sign in to comment.