dinput: Detect more buttons as non-joysticks.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
524783dfeb
commit
1dfc36c379
|
@ -168,7 +168,7 @@ static INT find_joystick_devices(void)
|
|||
struct JoyDev joydev, *new_joydevs;
|
||||
BYTE axes_map[ABS_MAX + 1];
|
||||
SHORT btn_map[KEY_MAX - BTN_MISC + 1];
|
||||
BOOL is_stylus = FALSE;
|
||||
BOOL non_js = FALSE;
|
||||
|
||||
snprintf(joydev.device, sizeof(joydev.device), "%s%d", JOYDEV_NEW, i);
|
||||
if ((fd = open(joydev.device, O_RDONLY)) == -1)
|
||||
|
@ -242,8 +242,9 @@ static INT find_joystick_devices(void)
|
|||
case BTN_DEAD:
|
||||
joydev.is_joystick = TRUE;
|
||||
break;
|
||||
case BTN_MOUSE:
|
||||
case BTN_STYLUS:
|
||||
is_stylus = TRUE;
|
||||
non_js = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -251,9 +252,9 @@ static INT find_joystick_devices(void)
|
|||
}
|
||||
}
|
||||
|
||||
if(is_stylus)
|
||||
if(non_js)
|
||||
{
|
||||
TRACE("Stylus detected. Skipping\n");
|
||||
TRACE("Non-joystick detected. Skipping\n");
|
||||
close(fd);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue