Commit Graph

41 Commits

Author SHA1 Message Date
revvv
22669edfed update coding style for PR 2019-08-11 21:08:16 +02:00
revvv
976e4672b4 add Retrode support 2019-08-11 20:13:38 +02:00
twinaphex
0257e01bee Refactor input_autoconfigure_connect - don't return
value - set input device name upon failure implicitly
2019-07-16 15:28:22 +02:00
twinaphex
5bf829339d (HID) Uniquely name symbols 2019-05-27 14:32:40 +02:00
twinaphex
a82bb0ec94 Create special type input_bits_t 2018-04-08 20:21:12 +02:00
gblues
0ae7ffe0d3 Clean up dumb compile warnings, fix crash bug
== DETAILS

- the free() method of the hid_driver_t interface needs its
  parameter defined as const in order for the compiler to stop
  complaining about losing const-ness.
- if a joypad list is created with <MAX_USERS slots in it, the
  destroy() function will crash because it assumes there are MAX_USERS
  entries.

  To do this, the allocate function creates n+1 slots, and gives the
  last slot a canary value that the destroy() method can then watch for
  when iterating through the list.
2017-12-30 04:43:27 +01:00
gblues
982d6893b0 Set the send_control pointer on the drivers
== DETAIL

One minor detail missed in the last commit: actually putting the
send_control function into the driver declaration. Woops.

Not doing the Wii U because it will be using the other methods.
2017-12-30 04:41:07 +01: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
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
Brad Parker
5453853001 remove extra paren 2017-11-29 11:32:32 -05:00
Brad Parker
44b70efb68 style nits 2017-11-29 10:42:39 -05:00
David Walters
c5bdc02d6f replace uint64_t with retro_bits_t* for pad buttons state 2017-11-28 10:04:34 +00:00
Rob Loach
fa75f47995
Fix includes of input_config 2017-08-30 23:14:27 -04:00
twinaphex
612cb54cfe Merge input_hid_driver 2017-06-11 08:56:36 +02:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01: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
d9def056e7 The 'connect' task now sets the device name upon completion 2016-12-16 12:33:56 +01:00
twinaphex
e9f853ba93 Move (joykey == NO_BTN ) to input_joypad_driver 2016-12-11 08:44:55 +01:00
twinaphex
70557fdee6 (Wii) Buildfix 2016-12-02 00:24:54 +01: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
4571dc33fc header include cleanups 2016-09-05 17:29:19 +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
347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex
074f14b132 Add verbosity.c/verbosity.h 2015-11-23 12:03:38 +01:00
Twinaphex
db35a28e50 Revert "Refactor slots to be a part of input_hid_driver.c now"
This reverts commit 646ded9d1c.
2015-11-16 03:48:51 +01:00
twinaphex
646ded9d1c Refactor slots to be a part of input_hid_driver.c now 2015-11-16 03:39:40 +01:00
twinaphex
e986b9e42a Static code analysis cleanups 2015-09-29 17:35:28 +02:00
twinaphex
61a40be54d Remove USB_Initialize/USB_Deinitialize from wiiusb_hid.c 2015-09-24 00:09:59 +02:00
twinaphex
e654c5cb65 Header cleanups 2015-09-05 20:53:56 +02:00
twinaphex
bc6692e567 (wiiusb_hid.c) Remove goto error 2015-09-01 18:53:35 +02:00
twinaphex
d5d498df5f (wiiusb_hid.c) Remove problematic line 2015-09-01 18:44:25 +02:00
twinaphex
cd781ff4b5 Cleanups 2015-08-30 15:15:39 +02:00
twinaphex
202ffaee3b (wiiusb_hid.c) Don't call remove_adapter from remove_notify 2015-08-30 12:44:29 +02:00
twinaphex
f95049e99c Add wiiusb_hid driver courtesy of @xerpi 2015-08-30 09:48:38 +02:00