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:
Yves Rizoud 2011-01-23 16:34:14 +00:00
parent 14a859f711
commit e7842861f7

View File

@ -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)