1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 20:25:47 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
Eric Warmenhoven
ed33eb70a6
mfi: left/right pressure sensitive triggers (#16385) 2024-03-28 12:58:26 -07:00
jiangxiaogang
44142ceeb8 Fixed android gamepad binds 2023-06-06 01:52:39 +02:00
warmenhoven
5685b5a9a1
mFI on OSX (#14975)
This adds mFI as a controller driver for OSX, as well as adding rumble
support for mFI controllers. Also add support for the Home button.

Also fixed a couple warnings.
2023-02-13 21:49:35 +01:00
libretroadmin
14afdf0e87 (Android) Backport 2020e9ce6a -
* Gingerbread support
* Touchpads support
* builtin Xperia Play autoconfig profile
2022-07-08 21:03:19 +02:00
Nathan Strong
a4d8ce7753 Try to support multi-pad HID devices
== DETAILS
I tried to modify the joypad connection interface to support
multi-pad HID devices ... it doesn't work. I'm not sure why.
2021-10-05 09:23:08 -07:00
Nathan Strong
9846ebb171 enable GCA adapter, minor cleanup
== DETAILS

I'm going to need to re-implement the abstraction between HID device
and gamepad; the changes here lay down some foundation for that work.

- reduce logging priority of some statements I modified while debugging
- factor out the pad driver lookup into its own method
- fix so the pad driver list isn't re-initialized every invocation
- add the button() method for the GCA driver
2021-10-05 09:23:08 -07:00
Nathan Strong
5da1cd08ff Unify the HID driver architecture
== DETAILS
When I first implemented the Wii U HID architecture, I ended up
having to design my own implementation because, at the time, I did
not have a way to read the HID device string to allow the existing
code to successfully detect the gamepad.

After spending some time experimenting, I've figured out how to
do this. And that means I can better align the HID driver with other
platforms.

change summary:

- create a single state structure for all three sub-types of wiiu pads
  (kpad, wpad, and hid)
- eliminate confusing duplicate pad lists
- eliminate confusing duplicate HID pad drivers (ds3, gamecube
  adapter, etc)
- ensure the ds3 driver still works
2021-10-05 09:23:08 -07:00
gblues
78858a9474
Fix analog inputs on HID devices (#12991)
== DETAILS

File this one under "I'm not sure how this ever worked."

I mean, it did (in 1.8.8). I'm not sure what changed, but ultimately what I did was
a bunch of comparative testing against 1.8.8:

- I confirmed the packet data was still being read successfully
- I confirmed that the axis value being passed into pad->get_axis() had
  not changed
- I confirmed the work done in `gamepad_read_axis_data()` was working the same
  between 1.8.8 and master

With the only difference between 1.8.8 and current being the return value from
`gamepad_read_axis_data()`, I just rewrote the method to work properly, and
also fixed up the default axis mapping.

I tested this with a sixaxis controller and GCA, configuring the analog-to-digital
control override to use the right stick.
2021-09-15 03:30:05 +02:00
twinaphex
b1af12efc9 Add more PSL1GHT ifdefs 2020-12-27 18:56:00 +01:00
twinaphex
870707dbe8 Remove obsolete __CELLOS_LV2__ references - use PSL1GHT instead 2020-12-19 15:32:26 +01:00
jdgleaver
2dc837850f OpenDingux: Add 'sdl_dingux' input/joypad drivers and use by default 2020-10-08 13:26:45 +01:00
jdgleaver
9b1edc5eee Input autoconfig fixes/improvements 2020-07-20 12:34:29 +01:00
jdgleaver
fc2c79b488 (3DS) Fix C-Stick y-axis inversion 2019-06-19 18:09:35 +01:00
Yoshi Sugawara
45185d6827 tvOS: remove the tvOS modules directory and use the iOS modules one since cores built using the iOS SDK work on tvOS
iOS: change default joypad driver to be mfi
iOS: move autodetect of mfi controller to mfi_joypad driver and set the default mapping for both iOS and tvOS
iOS: support unsupported buttons on mfi controller (select,L3,R3) by using hotkey combinations using the MENU button
tvos: use INPUT_TOGGLE_DOWN_Y_L_R as default for menu toggle gamepad combo
2019-02-01 05:33:29 -10:00
Yoshi Sugawara
a18512375b Support for tvOS
- add tvOS target
    - support code signing tvOS cores by adding an argument to the code signing cores script
    - use NSCachesDirectory for the documents directory
    - add some mfi controller handling logic to set non-game controllers to the last index to avoid interfering with operation
    - autodetect mfi controller for apple tv on startup - added autodetect to hid joypad
    - added a webserver to transfer files for tvOS
    - xcode: clean up project, remove unused folders
    - remove HAVE_MATERIALUI setting for tvos build, make it use XMB as default
    - added retroarch app icon courtesy of @MrJs
    - added auto-detect of mfi controller for apple tv
2019-01-29 10:13:46 -10:00
Twinaphex
40997473ed
Merge branch 'master' into orbis2 2019-01-08 20:18:08 +01:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
Francisco José García García
ea2ed2fb07 [ORBIS] More input driver changes 2018-12-31 00:14:56 +01:00
jdgleaver
37acbd1ecf (3DS) Add joypad input labels 2018-12-18 16:30:05 +00:00
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