Commit Graph

4 Commits

Author SHA1 Message Date
Bill Currie 7f408351b9 [input] Use a single select call for all drivers
For drivers that support it. Polling is still supported and forces the
select timeout to 0 if any driver requires polling. For now, the default
timeout when all drivers use select is 10ms.
2021-09-26 15:11:07 +09:00
Bill Currie 192b76ddc6 [input] Remove closed device in correct place
Removing the device from the devices list after closing the device
could cause the device to be double-freed if something went wrong in the
device removal callback resulting in system shutdown which would then
close all open devices.

The device is removed from the list before the callback is called.

There's still a small opportunity for such in a multi-threaded
environment, but that would take device removal occurring at the same
time as the input system is shut down. Probably the responsibility of
the threaded environment rather than inputlib.
2021-09-25 16:43:03 +09:00
Bill Currie 70812b3c49 [input] Hook up low level input to events
This includes device add and remove events, and axis and buttons for
evdev. Will need to sort out X11 input later, but next is getting qwaq
responding.
2021-08-30 14:40:19 +09:00
Bill Currie a91dac60d9 [input] Start work on improved input system
The common input code (input outer loop and event handling) has been
moved into libQFinput, and modified to have the concept of input drivers
that are registered by the appropriate system-level code (x11, win,
etc).

As well, my evdev input library code (with hotplug support) has been
added, but is not yet fully functional. However, the idea is that it
will be available on all systems that support evdev (Linux, and from
what I've read, FreeBSD).
2021-08-27 09:10:21 +09:00