Commit Graph

15 Commits

Author SHA1 Message Date
rdb ada3fa5513 Compile fixes on input-overhaul branch 2018-10-08 01:44:17 +02:00
rdb 9618cd2193 device: ensure libputil is initialized before scanning devices 2018-10-07 21:06:24 +02:00
rdb 6ada306184 input: split out macOS implementation of device manager 2018-02-04 11:00:43 +01:00
rdb 3da32b7b7c input: split out LinuxInputDeviceManager from InputDeviceManager 2018-01-25 20:15:16 +01:00
rdb 8bd617c4ee input: new windows input manager based on raw input
The new implementation uses a message-only window to register raw input events.

XInput is still used when possible, but raw input is being used to handle device detection.  (XInput is only enabled when an XInput device is plugged in, which also prevents us from having to load and poll the XInput library unnecessarily.)

For raw devices, the Windows HID parser library is used to parse the raw data.  Unfortunately, the Windows 7.1 SDK does not ship hid.lib (which is in the WDK 7.1.0), so I am dynamically loading hid.dll to prevent pulling in a dependency on the WDK.  (But perhaps we can ship hid.lib in the thirdparty libraries?)

Input devices other than XInput gamepads and the 3D mouse have not been tested very well yet.  Adding keyboard and mouse support is still a TODO.

This also splits out the Windows implementation of InputDeviceManager into a separate subclass; it is intended that the other implementations will follow suit.
2018-01-22 22:05:14 +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
fireclawthefox a6110a606e renamed gamepad to device in inputDeviceManager
renamed as not every device is a gamepad
2016-07-21 12:46:20 +02:00
rdb 1cc79633c1 Merge branch 'master' into input-overhaul
Conflicts:
	panda/src/device/buttonNode.cxx
	panda/src/device/clientAnalogDevice.I
	panda/src/device/clientAnalogDevice.cxx
	panda/src/device/clientButtonDevice.I
	panda/src/device/clientButtonDevice.cxx
	panda/src/device/clientDevice.I
	panda/src/device/clientDevice.cxx
	panda/src/device/clientDevice.h
	panda/src/device/clientTrackerDevice.I
	panda/src/device/trackerNode.I
	panda/src/device/trackerNode.h
	panda/src/display/callbackGraphicsWindow.cxx
	panda/src/display/graphicsWindow.cxx
	panda/src/display/graphicsWindowInputDevice.I
	panda/src/display/graphicsWindowInputDevice.cxx
	panda/src/display/graphicsWindowInputDevice.h
	panda/src/tinydisplay/tinyOsxGraphicsWindow.mm
	panda/src/tinydisplay/tinyXGraphicsWindow.cxx
	panda/src/windisplay/winGraphicsWindow.cxx
	panda/src/windisplay/winGraphicsWindow.h
	panda/src/x11display/x11GraphicsWindow.cxx
2016-03-19 14:54:56 +01:00
rdb 687e080bdd Add gamepad rumble support on Linux 2015-12-19 19:40:24 +01:00
rdb ab66108661 Robustify Linux gamepad support 2015-12-19 16:03:28 +01:00
rdb 307665891d Fix compile error on Linux in hotplug code 2015-12-17 01:45:23 +01:00
rdb d20d616918 XInput gamepad hotplugging, add base.devices.gamepads 2015-12-16 18:30:26 +01:00
rdb dd8344455c XInput gamepad control states, battery information, HID properties 2015-12-12 22:07:43 +01:00
rdb 35add447e6 Build on Windows; add XInput gamepad implementation 2015-12-12 00:57:01 +01:00
rdb bd0683d101 Generalised input framework for raw mice, gamepads, trackers (incl. HMDs like Oculus Rift) 2015-12-11 15:26:40 +01:00