40 Commits

Author SHA1 Message Date
Francisco Javier Trujillo Mata
0880bd00b0 PS2 is compiling with null drivers 2018-11-09 22:40:50 +01:00
rsn8887
827aa4936a [SWITCH] Use proper button labels 2018-10-03 18:50:33 -05:00
twinaphex
517b1b9089 Add HAVE_LIBNX ifdefs to switch_input.c/switch_joypad.c, and
features_cpu.c
2018-09-12 19:54:51 +02:00
rsn8887
6d5115a50d (Vita/PSP) Use proper button labels, fix inverted R-Stick Y axis 2018-05-09 22:55:33 -05:00
gblues
1d84c0eca1 Fix analog for DS3, plus some cleanups
== DETAILS

- DS3 analog wasn't working mainly because I forgot to actually declare the
  axes in input/input_autoconfig.c when declaring the pad. Whoops.
- I also moved the axis decoding logic to a more central place, because it
  clearly is not Wii U specific.
- Removed some dead commented-out code

== TESTING

Can use analog inputs on both GCA and DS3. Tested in Mario 3 on Nestopia core.

Haven't tested with any actual analog games, but I did confirm via logging
that the correct ranges are produced.
2018-04-23 23:22:27 -07:00
gblues
0c92fab0b9 Fix GameCube button detection
This should fix the issue where R/L buttons didn't register when doing
input detection.

This also brings the GC pad in line with the rest of the gamepads in
input_autodetect_builtin.c.

Also fixed a really stupid bug that was part of why analog inputs aren't
being read. Analog still isn't working, mind, but it's a lot closer to
working now that it's actually getting down into the pad driver level!
2018-04-20 00:00:33 -07:00
gblues
4433cbebc6 Get digital inputs for Sony DualShock 3 working
== DETAILS

- fix the bitshift math
- read the right bytes out of the ds3 data packet
- remove verbose logging in critical path
- stop caring about errors in the hid read loop -- seems to just
  be benign "device not ready" -- or at least, that's what I'm assuming
  given that the read eventually succeeds.

== TESTING
Played Mario 3 with the DS3 with no issues.
2018-04-05 23:03:38 -07:00
gblues
af08e5015a More work on Dual Shock 3 driver
== DETAILS

- update to not try starting the read loop until after the device
  is successfully initialized
- add new HID wrapper macros needed by ds3 driver
- add some debug logging to help with troubleshooting
- add button map for DS3

== TESTING
Tested with local build. DS3 init is not working.
2018-04-02 23:16:49 -07:00
gblues
2cf89feb86 Code clean-up
== DETAILS

Now that I have a working implementation, it's time to tidy up a bit:

- there was no need for the HID subsystem's object data to have a reference
  to the global hid state (since it's global), so removed it.
- refactored the users of that member to use the global state, defining
  reusable macros.
- reorganized the information in *.h files
- removing the hid state also made the constructor changes to the hid driver
  unneeded, so I reverted those changes.

== TESTING
Confirmed clean build. Haven't tested the build yet to make sure everything
still works, though.
2018-03-31 22:25:30 -07:00
gblues
d65bd90e67 Fix GC pad button mapping 2018-03-30 18:57:34 -07:00
gblues
5060c2aac4 More fixes, GC pad kinda sorta works
== DETAILS

- Added a new method to the joypad_connection_t interface for
  getting a single button
- wired everything into the hidpad driver
- for testing purposes, hacking the top-level joypad driver
  so that kpad isn't used
- add a new RARCH_LOG_BUFFER method to verbosity for logging the
  contents of a binary buffer (useful for writing/debugging pad drivers)
- fix a few bugs in the wiiu GC pad driver

The button mapping isn't quite right, and I'm not sure what's
going wrong.
2018-03-29 23:37:11 -07:00
gblues
89c1ba7929 Keep HID pads from clobbering gamepad/wiimotes
== DETAILS

Trying to do weird pad math just wasn't working so I bit the bullet and just
let it allocate all 16 pads in the slot list, then just mark 0-4 as
connected so that the slot allocator would start at 5.

I can see it detect the pad, but no idea if it works. Out of time for
today.
2018-03-29 23:37:11 -07:00
twinaphex
6311885824 (XDK1) Change D-pad to hat controls - make gamepad D-pad and analog
stick work properly
2018-01-20 19:48:29 +01:00
twinaphex
e6f637ea6b Set autoconfig binds for Xbox 2018-01-20 03:14:17 +01:00
Toad King
4fd750b48a add builtin autoconf script for emscripten gamepads with "standard" mapping 2018-01-14 04:24:37 -06:00
misson20000
7cc614263a (NSW) add default button bindings and fix right joystick 2017-12-31 03:04:11 +01:00
gblues
704cc61fd8 Fix bug in autodetect macro, gamepad now works properly
== DETAILS
The gamepad didn't work because I had tried to rename the pad from
'WIIU Gamepad' to 'WiiU Gamepad'.

I added some debug logging and (to cut out a lot of trial-and-error)
discovered that the reason it didn't work was because a bug in a macro
was  using the define literally instead of substituting it (so e.g.
the autodetect handler was trying to match 'WiiU Gamepad' against the
literal string 'PAD_NAME_WIIU_GAMEPAD').

- Fixed the macro bug
- Left a minimal amount of the debug logging in place; may come in
  handy for someone else.
- Updated wpad/kpad/hidpad to use the define constants

== TESTING
Did a test build and confirmed the gamepad responded.
2017-12-30 04:43:33 +01:00
Fabio
0d58d9ca0d
Added label to wii controllers, inverted the right stick Y axis of classic controller
The right stick Y axis of classic controller was wrong
2017-12-09 08:24:19 +01:00
Ash
bf3e256a43
[WiiU] Input: Make controller_patcher a compile-time option
As discussed in libretro#5357; controller_patcher is now optional. It's
off by default; though this could be changed with a simple makefile
tweak (ENABLE_CONTROLLER_PATCHER ?= 1, perhaps?)

To re-enable controller_patcher; append ENABLE_CONTROLLER_PATCHER=1 to
your usual make command.

controller_patcher was the only user of c++ constructors in the Wii U
port, so you'll need 26a006c in your tree otherwise you will have a
blackscreen on startup.
2017-12-01 18:29:21 +11:00
twinaphex
e16371b8a5 Merge input_config.c and input_driver.c 2017-08-31 02:25:04 +02:00
twinaphex
cfde480e82 Add some C89_BUILD rules 2017-08-12 17:41:34 +02:00
Maschell
4393e17ea7 [Wii U] Using the HID Controller as a own controller. Currently the stick only work when it's bind manually. Mapping from controller to retroarch input port may change when you attach a new device. 2017-05-08 21:46:34 +02:00
Brad Parker
57949227df DOS: initial input/joypad driver 2017-01-24 00:55:58 -05:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
aliaspider
14660a8c12 (WiiU) simplify input code, add button labels for autoconfigs. 2017-01-17 12:41:55 +01:00
aliaspider
8cb692622a (WiiU) add support for bluetooth controllers (Wiimote, nunchuk, classic
controller, wiiu pro controller).
2017-01-16 18:52:39 +01:00
Josh Palmer
437734e407 Rewrite QNX input & joypad drivers for proper BB10.3.1 support 2017-01-09 20:26:09 +00:00
radius
af02b3ac85 Allow builtin autoconfs with the XBONE controller 2016-12-25 21:03:04 -05:00
twinaphex
d3c22cb0e4 Move input/input_autodetect.c to tasks/task_autodetect.c 2016-12-01 20:38:20 +01:00
radius
a900bc41a8 fix l3/r3 2016-10-28 20:05:38 -05:00
radius
cb2e78e46d add android standard gamepad builtin autoconf 2016-10-28 18:15:24 -05:00
aliaspider
a4d745a471 preliminary port to the wiiu platform 2016-10-27 01:34:10 +01:00
twinaphex
37f3942985 (Vita) Hook up L3/R3 in autoconfig 2016-10-07 08:24:48 +02:00
twinaphex
b3d4fe398b autoconfig should be fixed now for XInput - wrong binds 2016-10-04 08:21:32 +02:00
Sunguk Lee
90678dd3de (Vita) Autodetect connection of controllers on PSTV 2016-10-01 02:26:28 +09:00
radius
55b865d375 remove this pad, the pad is named Standard Gamepad 2016-09-21 21:41:36 -05:00
twinaphex
642e46779b Cleanups 2016-09-06 23:59:43 +02:00
radius
f0485db137 Gamepad is named like this in emscripten 2016-09-03 22:21:10 -05:00
twinaphex
f93047145d Use SN_TARGET_PSP2 ifdef too 2016-09-03 07:41:56 +02:00
twinaphex
429165e966 Combine autoconfig builtin files into one 2016-09-03 07:39:26 +02:00