Commit Graph

16 Commits

Author SHA1 Message Date
rdb c34f2bbc64 Switch to UPPER_CASE convention for enum classes as per PEP-8
Old names are still kept around for compatibility reasons, but deprecated - fortunately there are not that many cases of enum classes yet
2023-08-02 11:16:54 +02:00
rdb 05d5bac598 Merge branch 'release/1.10.x' into incoming 2020-01-21 15:34:25 +01:00
Donny Lawrence 17dddeedc4 device: Fix 10.15 segfault on USB hotplug
For some reason, IOHIDDeviceRegisterRemovalCallback() no longer works on
10.15+, so an app will crash once trying to poll a device that doesn't
exist anymore.  Thankfully, there is the alternative solution of using
IOHIDManagerRegisterDeviceRemovalCallback(). This just required a little
rearranging of the callback code, as well as keeping track of the
connection between IOHIDDeviceRefs and IOKitInputDevices so we actually
know which device to remove.

Closes #847
2020-01-21 14:52:01 +01:00
rdb 9565d99fab Merge branch 'release/1.10.x' 2019-12-08 15:18:51 +01:00
LD 791be4766a MacOS: Don't crash if no elements are returned by IOHIDDeviceCopyMatchingElements
Fixes #797
2019-12-03 23:26:25 +01:00
Sam Edwards abc941245e general: Fix missing includes (and one forward declaration) 2019-08-24 18:05:28 -06:00
rdb 239dc40032 device: fix crash when unplugging certain devices on macOS
Fixes #621
2019-04-14 22:11:20 +02:00
rdb 7ed8b01a84 Merge branch 'input-overhaul' 2018-11-30 22:04:13 +01:00
rdb 2087d8ee84 device: change InputDevice enums to enum classes 2018-11-30 20:41:06 +01:00
rdb 8edc019307 device: overhaul InputDevice API:
- Rename "controls" terminology for analog inputs to "axes"
- Change some naming of accessors
- Unexpose methods where they are available as properties
- Add serial_number field
- Put battery levels under a "battery" field
2018-09-16 20:22:22 +02:00
rdb 8d8c5a546d input: rename "action_x" button handles to "face_x" 2018-09-16 14:50:00 +02:00
rdb 7cc100c38c device: change ControlAxis enum to an Axis enum class 2018-08-26 21:18:29 +02:00
rdb ba2de46beb Merge branch 'master' into input-overhaul 2018-06-08 15:23:47 +02:00
rdb c1fd2e46de input: more device support on macOS (incl. SpaceNavigator) 2018-02-04 11:32:59 +01:00
rdb 73b4217cad input: fix joystick button and axis mapping on macOS 2018-01-07 19:34:49 +01:00
rdb 920f1b75e3 input: support macOS gamepads, joysticks, raw keyboards/mice
I tested gamepads with a wireless 360 controller and a wired Xbox One controller using the 360Controller driver.  I tested the joystick support using a T.Flight Hotas X.
2017-12-22 15:33:33 +01:00