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
This commit is contained in:
parent
14a859f711
commit
e7842861f7
18
src/input.c
18
src/input.c
@ -590,11 +590,29 @@ int Handle_joystick_press(SDL_JoyButtonEvent event)
|
|||||||
if (event.button == Joybutton_control)
|
if (event.button == Joybutton_control)
|
||||||
{
|
{
|
||||||
SDL_SetModState(SDL_GetModState() | KMOD_CTRL);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
if (event.button == Joybutton_alt)
|
if (event.button == Joybutton_alt)
|
||||||
{
|
{
|
||||||
SDL_SetModState(SDL_GetModState() | (KMOD_ALT|KMOD_META));
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
if (event.button == Joybutton_left_click)
|
if (event.button == Joybutton_left_click)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user