Commit 1dfc36c3 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

dinput: Detect more buttons as non-joysticks.

parent 524783df
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment