Various fixes to traveler joystick input logic and to simulated joystick device
This commit is contained in:
parent
b972c34d5f
commit
df30780f37
|
@ -221,12 +221,12 @@ int up_buttonevent(int x, int y, int buttons)
|
|||
g_ajoy_sample.as_buttons |= AJOY_BUTTON_1_BIT;
|
||||
}
|
||||
|
||||
if ((buttons & 1) != 0)
|
||||
if ((buttons & 2) != 0)
|
||||
{
|
||||
g_ajoy_sample.as_buttons |= AJOY_BUTTON_2_BIT;
|
||||
}
|
||||
|
||||
if ((buttons & 1) != 0)
|
||||
if ((buttons & 4) != 0)
|
||||
{
|
||||
g_ajoy_sample.as_buttons |= AJOY_BUTTON_3_BIT;
|
||||
}
|
||||
|
@ -242,9 +242,10 @@ int up_buttonevent(int x, int y, int buttons)
|
|||
/* Check button presses */
|
||||
|
||||
changed = g_ajoy_buttons ^ g_ajoy_sample.as_buttons;
|
||||
pressed = changed & (AJOY_SUPPORTED & g_ajoy_buttons);
|
||||
released = changed & (AJOY_SUPPORTED & ~g_ajoy_buttons);
|
||||
|
||||
if (changed != 0)
|
||||
{
|
||||
pressed = changed & (AJOY_SUPPORTED & g_ajoy_pset);
|
||||
released = changed & (AJOY_SUPPORTED & ~g_ajoy_rset);
|
||||
if ((pressed & g_ajoy_pset) != 0 || (released & g_ajoy_rset) != 0)
|
||||
{
|
||||
/* Call the interrupt handler */
|
||||
|
@ -252,6 +253,7 @@ int up_buttonevent(int x, int y, int buttons)
|
|||
g_ajoy_handler(&g_ajoylower, g_ajoy_arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
@ -572,7 +572,7 @@ CONFIG_GRAPHICS_TRAVELER_JOYDEV="/dev/ajoy0"
|
|||
#
|
||||
CONFIG_GRAPHICS_TRAVELER_ROMFSDEMO=y
|
||||
# CONFIG_GRAPHICS_TRAVELER_PERFMON is not set
|
||||
CONFIG_GRAPHICS_TRAVELER_DEBUG_LEVEL=3
|
||||
CONFIG_GRAPHICS_TRAVELER_DEBUG_LEVEL=0
|
||||
|
||||
#
|
||||
# Interpreters
|
||||
|
|
Loading…
Reference in New Issue