linuxraw_joypad.c - Fix button polling

This commit is contained in:
Higor Eurípedes 2015-01-20 21:15:34 -03:00
parent c3c734c159
commit c756a643dd

View File

@ -59,7 +59,7 @@ static void poll_pad(struct linuxraw_joypad *pad)
if (event.number < NUM_BUTTONS)
{
if (event.value)
BIT32_SET(pad->buttons, event.value);
BIT32_SET(pad->buttons, event.number);
else
BIT32_CLEAR(pad->buttons, event.number);
}