mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08:00
evdev INPUT_PROP_SEMI_MT devices should be early-detected as touchpads
Some psmouse touchpads were being misdetected as joysticks due to only having INPUT_PROP_SEMI_MT and INPUT_PROP_POINTER as well as having BTN_1
This commit is contained in:
@@ -70,7 +70,8 @@ SDL_EVDEV_GuessDeviceClass(const unsigned long bitmask_props[NBITS(INPUT_PROP_MA
|
|||||||
|
|
||||||
/* We treat buttonpads as equivalent to touchpads */
|
/* We treat buttonpads as equivalent to touchpads */
|
||||||
if (test_bit(INPUT_PROP_TOPBUTTONPAD, bitmask_props) ||
|
if (test_bit(INPUT_PROP_TOPBUTTONPAD, bitmask_props) ||
|
||||||
test_bit(INPUT_PROP_BUTTONPAD, bitmask_props)) {
|
test_bit(INPUT_PROP_BUTTONPAD, bitmask_props) ||
|
||||||
|
test_bit(INPUT_PROP_SEMI_MT, bitmask_props)) {
|
||||||
return SDL_UDEV_DEVICE_TOUCHPAD;
|
return SDL_UDEV_DEVICE_TOUCHPAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
|
|
||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
|
|
||||||
|
#ifndef INPUT_PROP_SEMI_MT
|
||||||
|
#define INPUT_PROP_SEMI_MT 0x03
|
||||||
|
#endif
|
||||||
#ifndef INPUT_PROP_TOPBUTTONPAD
|
#ifndef INPUT_PROP_TOPBUTTONPAD
|
||||||
#define INPUT_PROP_TOPBUTTONPAD 0x04
|
#define INPUT_PROP_TOPBUTTONPAD 0x04
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user