Commit Graph
22 Commits
Author SHA1 Message Date
clobber 2531e9d7aa Add kHIDUsage_GD_SystemMainMenu element to the Generic Desktop buttons.
Used by the "Home" button on the Retro-Bit Official Sega Genesis/Saturn Bluetooth Controller 8-Button Arcade Pad
2020-01-08 14:11:53 -07:00
clobber 43151f5e05 Teach the parser about the two new controls handled by the system, they can either be triggers or buttons. 2020-01-03 13:07:28 +01:00
clobber 5890556da3 Add support for analogic brake and accelerator.
For now we limit our supports to those two and keeping this as a trial balloon. The HID specs specify that these values are dynamic (like an axis) but I've not seen enough of those to know if that's always the case or if they are sometimes used as a button. For now, we only mark them as a type of trigger if the difference between the minimum and maximum are greater than 1 which would be seen as a button. We also assume the minimum value is the resting point so they behave like triggers. Future improvements may include new supported element types or a complete separation of those types of controls into their own OEHIDEventType.
2020-01-03 06:18:27 +01:00
clobber 730d9e593b GameCube controllers as exposed by Mayflash GameCube Controller adapter have 6 axes whose values all span from 0 to 255, they have 2 analog sticks (4 axes) and 2 triggers (2 axes), with our current algorithm it is impossible to know which is which. This patch adds a new heuristic to differentiate those axes. If we have 6 axes there's a good chance the controller does not have 3 analog sticks but 2 and 2 triggers, assume that the first 4 axes we find are analog sticks and the last 2 are triggers. 2019-12-10 23:34:15 -08:00
clobber ec66a54171 Fix issue #2326. fix the issues introduced in the previous fix for this issue. Now known controllers should work like before. 2019-12-03 19:44:45 -08:00
clobber 0266483768 Fix issue #2326. Instead of caching controller descriptions after they are parsed the first time, we re-generate a controller description and perform a parsing of the HID element every time we plug in a new device. In the Logitech controller this means that the cookies retrieved on the device will be specific to each device handler but since we use the same names for each controls we will still associate the default mappings to each logitech controller no matter what cookies they advertize. 2019-12-02 21:18:09 -08:00
Daniele Cattaneo 63d7d87630 Do not crash when parsing HID devices that fulfill specific conditions. Should be a clean fix for issue #3941.
OpenEmu crashed only when the HID device fulfills all the following conditions:
(1) the device is generic (not present in the controller database)
(2) the device is not a compound HID device
(3) the device usage must be Joystick or Gamepad
(4) the device must have at least one of:
(4.a) one hat switch
(4.b) (at least one symmetric axis OR grouped axis) AND at least one positive-only axis
2019-09-09 15:08:31 +02:00
Daniele Cattaneo 75d11f2436 Slight refactoring of -OE_deviceHandlerClassForIOHIDDevice: (and removal of unused functions) 2019-08-31 00:05:24 +02:00
Daniele Cattaneo 1fb8e2cdff Implement basic support for the Switch Pro Controller 2019-08-30 23:41:02 +02:00
mrvacbob be5ecb6740 Use modern array/dict literal syntax 2019-06-02 04:50:49 -07:00
clobber 81f9cb2662 Add a PS4 Dualshock 4 device handler. 2018-06-09 14:23:07 -05:00
clobber e5193fe5eb Add support for some consumer keys that we know about. 2015-12-23 18:29:11 +01:00
clobber 265dff1264 Whoops, GD elements are not buttons! 2015-12-23 11:31:33 +01:00
clobber 9cd2d031a2 Fix kHIDUsage_GD_DPadUp, kHIDUsage_GD_DPadDown, kHIDUsage_GD_DPadLeft, kHIDUsage_GD_DPadRight, kHIDUsage_GD_Start, kHIDUsage_GD_Select parsing.
We separate kHIDPage_GenericDesktop and kHIDPage_Button to search for the elements, so we need to use a different array when touching the new usages that are not actually buttons.
2015-12-23 01:20:50 +01:00
clobber 431195e021 Annotate binding and device classes. 2015-11-29 14:05:18 -08:00
clobber 3836c5bf82 Add a unique identifier to OEDeviceHandler. This allows multiple processes to uniquely identify a device across processes, later on OEDeviceHandler will be sent over XPC so we can move event handling in the emulator process instead. 2015-11-28 16:28:28 -08:00
clobber 4415e6bc72 Hopefully fixes the issues with using multiple identical controllers. #585 2014-07-12 20:30:16 -05:00
clobber 5bf4135639 Use product name instead of name in OEDeviceDescription. 2014-03-01 22:46:43 -08:00
Remy Demarest 1c9e5af27d Fix for issue #674: generate an index set of the elements to remove and remove those indexes directly. 2013-07-04 19:00:37 +02:00
Remy Demarest 81ac812b92 Ignore collection elements when looking for elements corresponding to well-known device element definitions. 2013-04-12 11:34:02 -07:00
Remy Demarest 2abbdf6c3c Provide a more accurate parsing of all the elements in a given device. Correct various bugs. 2013-04-11 23:44:26 -07:00
Remy Demarest a0434761d7 Move OpenEmuSystem and OpenEmuBase frameworks into their own project. 2013-04-07 00:21:09 -07:00