John Regan 4f352227ea OSX Joypad Improvements
This commit has two main changes to the OSX HID driver:

1.

Some joysticks have invalid/incorrect 'use' assigned to buttons and
axes. For example, my RetroUSB.com Genesis Retroport reports 8 buttons,
but they're reported as 1, 2, 3, 4, 1, 2, 3, 4, and my RetroLink
Gamecube-clone controller reports 2 axes with id 50.

OSX assigns each of these elements a unique cookie value, so it's still
possible to uniquely identify a button. Whenever a controller is
connected, the driver scans for all buttons and axes. When it identifies
a duplicate 'use' id, it reassigns it a new ID.

Whenever the input callback is called, it grabs the cookie value,
finds the input element with a matching cookie, and uses that element's
id instead of the one reported by the device.

The old joystick configs should not be broken by this - I'm using the
existing 'use' value wherever possible, and only changing it when it's
broken.

The 'faked' ids are done in a deterministic way, a joystick will never
have a button's 'faked' id change between launches of RetroArch.

2.

This enables HAT switch input.
2017-01-15 12:17:47 -06:00
..
2016-12-01 16:42:21 +01:00
2016-12-24 01:47:01 +01:00
2017-01-15 12:17:47 -06:00
2017-01-10 20:05:53 +01:00
2016-12-18 19:28:42 -05:00
2016-09-06 23:59:43 +02:00
2016-06-03 05:54:21 +02:00
2016-11-04 14:29:02 +01:00
2016-06-03 06:02:49 +02:00