40 Commits

Author SHA1 Message Date
gblues
fb5b31faf3 Merge branch 'master' into gblues/hid 2018-04-14 14:18:03 -07:00
twinaphex
a82bb0ec94 Create special type input_bits_t 2018-04-08 20:21:12 +02:00
gblues
0100d58ffb WIP: evolve driver implementation
== DETAILS

I've created the concept of a hid_driver_instance_t which is basically
a central place to store the hid pad driver, hid subsystem driver,
the pad list, and the instance data for the above in a central location.

The HID pad device drivers can use it to perform HID operations in a
generic manner.

This is more-or-less a pause point so I can catch up with upstream.

== TESTING

Haven't tested this yet. Compiles without warnings though!
2018-03-29 23:37:11 -07:00
gblues
5b37ced196 Update HID pad driver architecture
== DETAILS

The current HID implementation assumes a very low-level USB library
is being used. This causes a problem on Wii U, because the Cafe OS
only exposes a high-level interface.

To get these functions exposed to the HID pad drivers, I had to make
three changes:

1. I added the legacy "send_control" function to the HID driver
   interface
2. I modified the signature of pad_connection_pad_init() to send the
   driver pointer instead of the function pointer
3. I updated the HID pad drivers to keep the pointer to the driver
   instead of the function pointer, and updated the calls into the
   send_control function as appropriate
4. I updated the HID drivers to use the new pad init signature

== TESTING
Untested, in theory it should work without a hitch because at this
point all I've done is abstract things a little. I still need to
update the HID pad drivers to use the Wii U-specific calls as
appropriate.
2017-12-30 04:41:01 +01:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex
f0c143766e Change to 256bit macros 2017-12-05 12:07:35 +01:00
twinaphex
e94300a581 Get rid of a lot of RARCH_INPUT_STATE_BIT_ macros - replace them
with BIT128_ equivalents instead
2017-12-05 09:22:56 +01:00
David Walters
f09477d46a additional compile fixes 2017-11-28 10:36:16 +00:00
David Walters
c5bdc02d6f replace uint64_t with retro_bits_t* for pad buttons state 2017-11-28 10:04:34 +00:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex
afe67ca254 C89/C90 don't support bitfields on uint8_t - work around this 2016-06-07 14:47:54 +02:00
twinaphex
97d5a971a4 Change header includes 2016-04-17 07:34:01 +02: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
2e8f015de3 Cleanups 2016-02-04 21:07:02 +01:00
twinaphex
347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex
d70d09ad8d (connect_ps4.c) Cleanup 2015-12-12 17:58:40 +01:00
twinaphex
a3c34a7813 Cleanups 2015-11-28 02:31:19 +01:00
twinaphex
f95049e99c Add wiiusb_hid driver courtesy of @xerpi 2015-08-30 09:48:38 +02:00
twinaphex
135ee2f503 Use UINT64_C(1) everywhere instead of 1ULL 2015-07-12 07:53:46 +02:00
twinaphex
e74e402cdc More C89 build fixes 2015-06-30 14:37:11 +02:00
twinaphex
2087a41f20 (connect) Style nits 2015-04-07 18:49:21 +02:00
Toad King
5701f4f73a libusb updates, still need to figure out config issue preventing keys being registered 2015-04-06 22:07:59 -05:00
twinaphex
6433cdf2e7 (input/connect) Cleanups 2015-04-02 18:48:44 +02:00
twinaphex
6ea55bfaa9 (connect_ps4.c) Fix condition check 2015-04-02 18:28:29 +02:00
twinaphex
b9e6b014e3 Start preparing joypad_connection code for cross-platform purposes 2015-04-02 17:49:32 +02:00
Twinaphex
013038d3ef (connect_ps4.c) Cleanups 2015-04-01 01:23:43 +02:00
Twinaphex
28a85d9331 (connect_ps4.c) Make analog work 2015-04-01 00:20:39 +02:00
Twinaphex
467c007864 (connect_ps4.c) PS4 pad works now - TODO: analog/rumble (potential FUTURE: touchpad and other stuff) 2015-03-31 22:28:56 +02:00
Twinaphex
7e97764882 (connect_ps4.c) Update 2015-03-31 21:42:43 +02:00
Twinaphex
a4190a9c3f (PS4/connect_ps4.c) Update 2015-03-31 21:40:22 +02:00
Twinaphex
ebd85ea02b (PS4/joypad_connection) PS4 joypad is starting to work 2015-03-31 21:18:21 +02:00
Twinaphex
047fdbd3fc (PS4/joypad_connection) Changes 2015-03-31 19:23:06 +02:00
twinaphex
453321c50b Start updating headers 2015-01-07 17:46:50 +01:00
twinaphex
f08f78e86a (joypad_connection) start calling 'connect' function 'init'
and 'disconnect' 'deinit'
2014-10-22 07:59:52 +02:00
twinaphex
c62d52de0f Start properly implementing libretro SDK for boolean.h include
header, glsym, and rthreads
2014-10-21 05:05:52 +02:00
twinaphex
0fb301fa43 (joypad/connect) Change 'index' local variables 2014-10-20 20:32:41 +02:00
twinaphex
7c842f9342 More stdio.h header include removals 2014-10-16 07:29:42 +02:00
Twinaphex
c9bd4ad589 Comment out unused code 2014-10-15 03:25:36 +02:00
Lioncash
316870201f Fix possible memory leaks in hidpad_ps3_connect, hidpad_ps4_connect, and hidpad_wii_connect 2014-10-13 17:39:14 -04:00
twinaphex
d4a14c4cb9 Move joypad_connection code to input/connect 2014-10-04 23:02:48 +02:00