From e7842861f743e70d87768ecc5d3e683858843cb2 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sun, 23 Jan 2011 16:34:14 +0000 Subject: [PATCH] Finished Issue 400:Button for changing stylus click into right click behavior git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1693 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/input.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/input.c b/src/input.c index a6e33433..45b54b6f 100644 --- a/src/input.c +++ b/src/input.c @@ -590,11 +590,29 @@ int Handle_joystick_press(SDL_JoyButtonEvent event) if (event.button == Joybutton_control) { SDL_SetModState(SDL_GetModState() | KMOD_CTRL); + if (Config.Swap_buttons == MOD_CTRL && Button_inverter==0) + { + Button_inverter=1; + if (Input_new_mouse_K) + { + Input_new_mouse_K ^= 3; // Flip bits 0 and 1 + return Move_cursor_with_constraints(); + } + } return 0; } if (event.button == Joybutton_alt) { SDL_SetModState(SDL_GetModState() | (KMOD_ALT|KMOD_META)); + if (Config.Swap_buttons == MOD_ALT && Button_inverter==0) + { + Button_inverter=1; + if (Input_new_mouse_K) + { + Input_new_mouse_K ^= 3; // Flip bits 0 and 1 + return Move_cursor_with_constraints(); + } + } return 0; } if (event.button == Joybutton_left_click)