Commit Graph

179 Commits

Author SHA1 Message Date
Rob Loach
fa75f47995
Fix includes of input_config 2017-08-30 23:14:27 -04:00
Rob Loach
40f4d805a8 Fix non-existent include of input_config.h 2017-08-30 23:01:12 -04:00
twinaphex
612cb54cfe Merge input_hid_driver 2017-06-11 08:56:36 +02:00
twinaphex
c711749973 (iohidmanager_hid.c) Cleanups 2017-06-07 21:14:34 +02:00
twinaphex
126a5bf121 Use string_is_equal_fast/string_is_not_equal_fast 2017-05-16 04:00:37 +02:00
Twinaphex
aa2e7dc794 Silence warning 2017-02-26 03:53:05 +01:00
neville
fc2654cd0f (iohidmanager_hid.c) Silence a whole bunch of warnings 2017-01-29 20:20:43 +01:00
twinaphex
1b3225089e iohidmanager.c - Attempt to silence some warnings 2017-01-29 20:11:32 +01:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex
0354ced675 Style nits 2017-01-17 19:02:49 +01:00
twinaphex
e3e8796b2b (iohidmanager_hid.c) Stylistic cleanups 2017-01-15 21:13:01 +01:00
Twinaphex
1544a3d6e1 (OSX) Fix warnings 2017-01-15 21:07:15 +01:00
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
twinaphex
ea3dd6a95b Set device name when autoconfig connect task fails for all
other input drivers too
2017-01-13 05:00:13 +01:00
twinaphex
103042de96 Rewrite task_autodetect.c 2016-12-31 07:43:34 +01:00
twinaphex
66f189dff6 (wiiusb_hid.c) Prevent crashes 2016-12-26 00:38:54 +01:00
twinaphex
aafae944cb Don't memset autoconfig_params_t 2016-12-17 14:26:13 +01:00
Twinaphex
db1f3c058a (iohidmanager_hid.c) No longer need to include configuration.h now 2016-12-16 12:36:01 +01:00
twinaphex
d9def056e7 The 'connect' task now sets the device name upon completion 2016-12-16 12:33:56 +01:00
twinaphex
62f5b2d3c3 The disconnect task now clears the device name 2016-12-16 12:20:31 +01:00
Dave Leaver
cd5a5c5fd7 iohidmanager_hid: Remove name from adapters when they are disconnected 2016-12-16 20:17:24 +13:00
twinaphex
e9f853ba93 Move (joykey == NO_BTN ) to input_joypad_driver 2016-12-11 08:44:55 +01:00
twinaphex
021559a877 Get rid of runloop.h dependencies inside input/ dir 2016-12-02 06:07:45 +01:00
twinaphex
70557fdee6 (Wii) Buildfix 2016-12-02 00:24:54 +01:00
Twinaphex
0d79bc754c (OSX) Buildfix 2016-12-01 22:51:46 +01:00
Brad Parker
23dd41a3cc missing ../ 2016-12-01 15:40:31 -05:00
twinaphex
d3c22cb0e4 Move input/input_autodetect.c to tasks/task_autodetect.c 2016-12-01 20:38:20 +01:00
twinaphex
76d0380e45 Rename input_autoconfigure_joypad to input_autoconfigure_connect 2016-12-01 18:57:44 +01:00
twinaphex
e689d55414 Rename autoconfig functions 2016-12-01 18:52:34 +01:00
twinaphex
dad26e0956 Header cleanup 2016-11-05 14:10:30 +01:00
twinaphex
7dcf9dfa75 (libusb) Silence warning 'value stored to 'adaptor' is never read 2016-09-22 21:49:59 +02:00
twinaphex
9ee5931c5e Nits 2016-09-14 23:37:20 +02:00
twinaphex
4571dc33fc header include cleanups 2016-09-05 17:29:19 +02:00
twinaphex
467451fccc Cleanup more header includes 2016-09-01 18:18:55 +02:00
twinaphex
eea287d156 (BTStack HID) Create HAVE_DYNAMIC ifdefs 2016-06-27 01:11:49 +02:00
twinaphex
d8b3597455 menu_cbs_deferred_push.c - Fix 'array compared against 0' 2016-06-02 20:51:27 +02:00
twinaphex
a98616b45b Fix explicit NULL dereferenced/dereference before null check warnings 2016-05-26 17:47:21 +02:00
twinaphex
40023833e0 (IOHIDManager) Plug another potential leak 2016-05-25 02:35:13 +02:00
Twinaphex
c1e82d3f1a (IOHidManager) Fix adapter leak 2016-05-24 14:01:46 +02:00
twinaphex
4e74a990d4 (IOHIDManager) Free some resource leaks 2016-05-24 13:48:02 +02:00
twinaphex
0f21ab247c header cleanup 2016-04-17 07:37:00 +02:00
twinaphex
ef4a1a3c0f (libretro-common) Rename fifo_buffer to fifo_queue 2016-03-20 14:06:21 +01:00
twinaphex
d3aaa7ac88 Style nits 2016-02-05 14:42:20 +01:00
twinaphex
341e8f8f15 Cleanup 2016-02-05 14:35:16 +01:00
netux79
bca4ccb155 (GX) Refactor of the Wii USB HID support. Now it's working!
In order to have a controller working you need:
1) Have a matching HID autoconfig file in autoconfig/hid for your controller.
2) Create a "connect" driver for the pad in "input/connect" folder (source code of RA).
3) Once you are in RA, change the joystick driver to HID and restart.
4) You may be now able to use you USB HID compatible pad in RA.

I included some "connect" drivers as an example. It also need to include them for compilation.
2016-02-04 17:01:03 -05:00
twinaphex
347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex
697351ee67 (input) Use string_is_empty 2015-12-26 07:54:17 +01:00
twinaphex
2f29d9f18c Take out menu/menu_driver.h include from driver.h 2015-12-05 13:22:50 +01:00
twinaphex
d15ad86705 Create hid_driver_get_data 2015-11-29 21:11:57 +01:00
twinaphex
a3c34a7813 Cleanups 2015-11-28 02:31:19 +01:00