Alistair Leslie-Hughes : dinput: Don't treat Stylus devices as joysticks.
Alexandre Julliard
julliard at winehq.org
Wed Oct 9 14:36:29 CDT 2019
Module: wine
Branch: master
Commit: db07ff83b3385736f2f23c8aa001c4650e99f82c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=db07ff83b3385736f2f23c8aa001c4650e99f82c
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Wed Oct 9 08:14:46 2019 +0000
dinput: Don't treat Stylus devices as joysticks.
Tablet/Stylus devices have a js* entry which we are
treating as a joystick. Any testbox VM that is configured
with a tablet is currently failing the joystick tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput/joystick_linux.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index 4ee7397c2c..e0c1331937 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -168,6 +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;
snprintf(joydev.device, sizeof(joydev.device), "%s%d", JOYDEV_NEW, i);
if ((fd = open(joydev.device, O_RDONLY)) == -1)
@@ -241,12 +242,22 @@ static INT find_joystick_devices(void)
case BTN_DEAD:
joydev.is_joystick = TRUE;
break;
+ case BTN_STYLUS:
+ is_stylus = TRUE;
+ break;
default:
break;
}
}
}
+ if(is_stylus)
+ {
+ TRACE("Stylus detected. Skipping\n");
+ close(fd);
+ continue;
+ }
+
if (ioctl(fd, JSIOCGAXMAP, axes_map) < 0)
{
WARN("ioctl(%s,JSIOCGAXMAP) failed: %s\n", joydev.device, strerror(errno));
More information about the wine-cvs
mailing list