提交 5c65f3c1 编写于 作者: R Romain Vimont

Forward DOWN and UP separately for middle-click

With this change, the actual HOME is handled by Android on UP on the
device. This is consistent with the keyboard shortcut (MOD+h) behavior.
上级 f0f96fbc
......@@ -647,6 +647,8 @@ 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);
......@@ -654,9 +656,7 @@ input_manager_process_mouse_button(struct input_manager *im,
return;
}
if (control && event->button == SDL_BUTTON_MIDDLE) {
if (down) {
action_home(im->controller, ACTION_DOWN | ACTION_UP);
}
action_home(im->controller, action);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册