Treat any key device as a keyboard
This matches commit b8e85a5ac99a for when udev is not running
This commit is contained in:
parent
af960c21b5
commit
7d788b9de3
1 changed files with 3 additions and 3 deletions
|
@ -371,10 +371,10 @@ guess_device_class(struct udev_device *dev)
|
||||||
devclass |= SDL_UDEV_DEVICE_MOUSE; /* ID_INPUT_MOUSE */
|
devclass |= SDL_UDEV_DEVICE_MOUSE; /* ID_INPUT_MOUSE */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the first 32 bits are ESC, numbers, and Q to D; if we have all of
|
/* the first 32 bits are ESC, numbers, and Q to D; if we have any of
|
||||||
* those, consider it a full keyboard; do not test KEY_RESERVED, though */
|
* those, consider it a keyboard device; do not test KEY_RESERVED, though */
|
||||||
keyboard_mask = 0xFFFFFFFE;
|
keyboard_mask = 0xFFFFFFFE;
|
||||||
if ((bitmask_key[0] & keyboard_mask) == keyboard_mask)
|
if ((bitmask_key[0] & keyboard_mask) != 0)
|
||||||
devclass |= SDL_UDEV_DEVICE_KEYBOARD; /* ID_INPUT_KEYBOARD */
|
devclass |= SDL_UDEV_DEVICE_KEYBOARD; /* ID_INPUT_KEYBOARD */
|
||||||
|
|
||||||
return devclass;
|
return devclass;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue