Commit Graph

735 Commits

Author SHA1 Message Date
twinaphex 771c0fec39 Add xinput_joypad.h header 2020-07-31 18:22:35 +02:00
twinaphex 748886c5e5 (DInput) Cleanups 2020-07-31 18:15:36 +02:00
twinaphex ed3ee2511f Cleanups - add local variable 2020-07-29 05:31:23 +02:00
rsn8887 78c9dbbd20 Fix input port assignments 2020-07-28 16:35:16 -05:00
twinaphex 8777a6eb6a (WiiU) Buildfix 2020-07-23 05:42:51 +02:00
Autechre 6c7143d02d
Merge pull request #10981 from yoshisuga/yoshisuga/ios-metal
iOS/tvOS Metal Renderer
2020-07-21 20:41:07 +02:00
twinaphex caa1145b35 (joypad drivers) xdk_joypad.c - cleanup(joypad drivers) xdk_joypad.c -
cleanup(joypad drivers) xdk_joypad.c - cleanup(joypad drivers)
xdk_joypad.c - cleanup(joypad drivers) xdk_joypad.c - cleanup(joypad
drivers) xdk_joypad.c - cleanup(joypad drivers) xdk_joypad.c -
cleanup(joypad drivers) xdk_joypad.c - cleanup(joypad drivers)
xdk_joypad.c - cleanup
2020-07-20 23:15:19 +02:00
Francisco Javier Trujillo Mata 67e0a49941 Fix ps2_joypad compilation after refactor of the main driver 2020-07-20 22:51:00 +02:00
jdgleaver 8e2901d23a Minor optimisations 2020-07-20 13:24:18 +01:00
jdgleaver 9b1edc5eee Input autoconfig fixes/improvements 2020-07-20 12:34:29 +01:00
twinaphex 994d6aee63 Cleanups 2020-07-20 06:48:02 +02:00
twinaphex 0e9a86816e xinput_joypad_poll - make UWP codepath leading 2020-07-20 03:35:52 +02:00
twinaphex abd3365a34 (XInput Joypad) Cleanups 2020-07-20 03:19:14 +02:00
twinaphex 5f7e8593d0 (DInput Joypad) Cleanups(DInput Joypad) Cleanups(DInput Joypad)
Cleanups(DInput Joypad) Cleanups(DInput Joypad) Cleanups(DInput Joypad)
Cleanups(DInput Joypad) Cleanups(DInput Joypad) Cleanups(DInput Joypad)
Cleanups
2020-07-20 03:04:18 +02:00
twinaphex 6cba44328d (PSP) Buildfix 2020-07-20 00:58:57 +02:00
twinaphex 74e5d366c8 (WiiU) Buildfix 2020-07-20 00:53:21 +02:00
twinaphex 897a9de5be (drivers_joypad) Cleanup axis functions 2020-07-19 18:51:05 +02:00
Yoshi Sugawara fd9ac64d55 Merge branch 'master' into yoshisuga/ios-metal 2020-07-19 00:33:54 -10:00
twinaphex 0207e29ee9 (Android) Cleanups 2020-07-19 04:13:23 +02:00
twinaphex 24f310a26d Small cleanup 2020-07-19 03:48:26 +02:00
twinaphex b1a6b35379 Buildfix 2020-07-19 03:23:07 +02:00
twinaphex 285b0ec0bb Buildfix 2020-07-19 03:20:41 +02:00
twinaphex d97e590aaf Reimplement multi button state functions 2020-07-19 03:18:12 +02:00
twinaphex ad2279bb29 Cleanups 2020-07-18 23:06:12 +02:00
twinaphex cb5b22b6ac (Android) Refactor axis functions 2020-07-18 22:38:23 +02:00
Autechre f8d6cea02a
Update udev_joypad.c 2020-07-18 21:56:27 +02:00
twinaphex 08ad00f5d3 Start preparing for being able to grab multiple buttons at the same time 2020-07-18 19:51:14 +02:00
twinaphex 8b078662cd Change function signature of joypad driver's 'button' 2020-07-18 18:07:57 +02:00
jdgleaver 84a71ea133 Rewrite 'task_autodetect.c': Ensure thread safety + clean-ups/rationalisation 2020-07-14 17:46:58 +01:00
twinaphex 79cc4f9c4f Revert "Start going through wrapper functions for access to input_device_names"
This reverts commit 92293525c1.
2020-07-05 16:41:55 +02:00
twinaphex 92293525c1 Start going through wrapper functions for access to input_device_names 2020-07-05 10:33:21 +02:00
twinaphex dfeef4e772 (XInput) Do away with memsets 2020-06-29 02:44:35 +02:00
twinaphex aa4f84b037 (Dinput) get rid of memsets 2020-06-29 02:37:06 +02:00
twinaphex 451a06076d Revert "(dinput_joypad) Grab window pointer once"
This reverts commit d85eb927c1.
2020-06-12 06:36:19 +02:00
twinaphex d85eb927c1 (dinput_joypad) Grab window pointer once 2020-06-12 06:12:25 +02:00
twinaphex a0e6a9e1d5 (xinput joypad) Function can be made static 2020-06-11 04:53:20 +02:00
twinaphex cfc511cc6b (Dinput joypad) Some cleanups 2020-06-11 04:46:15 +02:00
twinaphex b363ed7d79 (drivers_joypad) get rid of excessive logging 2020-06-11 04:06:33 +02:00
twinaphex c63a65ffa5 (WiiU) Cleanups 2020-06-10 06:30:23 +02:00
twinaphex ad1aa59ce1 Cleanup != NULL comparisons 2020-05-19 21:15:06 +02:00
Ash Logan 70fba3e92e (WiiU/kpad) Actually return true when kpad_init succeeds, warning fix 2020-05-17 16:43:38 +10:00
Ash Logan 41541128c5 (WiiU/hid) Warning fixes 2020-05-17 16:42:31 +10:00
Ash Logan f22af81e7d (WiiU/wpad) Allow hotplugging Gamepad, support >1 channel 2020-05-17 16:32:51 +10:00
Vladimir Serbinenko 2fb7ba22e5 PSL1GHT port
Working:

* packaging
* running cores
* switching cores
* gamepad including axis
* rgui
* audio
* video

Not working:

* OSD
* menus other than rgui
* shaders
* Graphical acceleration
* Proper signing
* ODE build
* rumble
* keyboard
* mouse

Not tested:

* A lot
2020-03-30 05:39:22 +02:00
FmT0 f0faedddf9
Update psp_joypad.c
Fix "Prefer Front Touch" option from Input menu for Vita toggle menu input
2020-03-16 20:07:10 +09:00
twinaphex 0ec3a8a449 (Input) Settings cleanups 2020-02-23 06:05:23 +01:00
Toad King 14c67fde7f emscripten: recreate input event listeners properly
There's a new (undocumented -_-) API for removing event listeners in emscripten
now, so use that when recreating input listeners. Fixes mouse events breaking
when loading cores.
2020-01-18 12:51:21 -06:00
twinaphex fe9022afe0 More CXX_BUILD fixes 2020-01-18 05:48:19 +01:00
twinaphex 246863279a Get rid of null input and null joypad driver files 2020-01-06 15:28:11 +01:00
ThePhxRises 3c27300a4e [VITA] Enable touch regardless of MiniVitaTV 2019-12-14 20:50:17 +01:00
ThePhxRises 65f406a39e [VITA] MiniVitaTV Support
Set kernel model manually with sceCtrlIsMultiControllerSupported()
2019-12-14 20:50:17 +01:00
Dmitry Sergeenkov 5cdef89b86 Get rid of 128 byte device name limit for XInput device discover 2019-11-22 21:15:58 +03:00
twinaphex 920a20f060 (GX) Silence more warnings 2019-09-22 11:35:09 +02:00
benoa 9250f649db GameCube: Fix build 2019-09-19 15:13:22 +02:00
twinaphex 1d621c412c Add HW_RVL to this - won't compile on Gamecube otherwise 2019-09-19 02:15:18 +02:00
benoa 744fac6777 Wii: Add wiimote lightgun support 2019-09-15 00:46:02 +02:00
Twinaphex 1091193ed5
Revert "[Switch] Really fix splitting/joining JoyCons via single option" 2019-08-26 14:22:58 +02:00
rsn8887 8c0c0e3eae [Switch] Really fix splitting/joining JoyCons via single option 2019-08-24 21:08:35 -05:00
Toad King 2874c5ee6e emscripten: Fix GLSL not being built in
fix gamepad builds to work with newer emscripten
2019-08-06 20:51:18 -05:00
twinaphex eb3753ee3c (XInput/DirectInput) Show device disconnect messages when unplugging a gamepad 2019-07-28 06:42:30 +02:00
twinaphex 91ef99f9b7 Restore this 2019-07-27 04:28:50 +02:00
twinaphex d28cadef01 Cleanups; turn more functions into static functions 2019-07-27 04:13:33 +02:00
Yoshi Sugawara 102f27ee80 iOS/tvOS/macOS: Fix autodetect for mFi controllers: properly call autodetect add on the connect notification, and add call to disconnect on GameController disconnect notification. 2019-07-24 11:45:42 -10:00
twinaphex 2750997724 (dinput) POV defines need mmsystem.h header include 2019-07-23 19:40:22 +02:00
twinaphex 5d8d6e18b2 (Dinput joypad) Prevent input going haywire once pad is disconnected 2019-07-23 18:46:40 +02:00
twinaphex f06607141d dinput_joypad_button - further cleanups 2019-07-23 18:37:28 +02:00
twinaphex 051fb92e83 (Dinput joypad) Cleanup magic numbers mess surrounding
hat code
2019-07-23 18:27:16 +02:00
twinaphex 783027ab96 (Dinput) Lots of pointless ARRAY_SIZE checks when the element size
never changes
2019-07-23 16:07:34 +02:00
twinaphex 642298c8b0 (ps4_joypad.c) C89_BUILD fixes 2019-07-23 15:47:13 +02:00
twinaphex ea4f9b4899 dinput_joypad_button - cleanups 2019-07-23 15:34:24 +02:00
twinaphex e0672e46a5 (Xinput) This variable doesn't need to be set at every button call 2019-07-23 14:32:46 +02:00
twinaphex 02876aecae Cleanups 2019-07-23 14:07:49 +02:00
twinaphex d4255b0e55 Cleanups 2019-07-23 13:59:51 +02:00
rsn8887 c226f0a683 [SWITCH] Fix splitting and joining of joycon controllers
Before this fix, splitting and joining of joycons only ever worked
sporadically.
2019-07-22 23:30:34 -05:00
orbea e13ec54dc6 Fix --disable-overlay. 2019-07-21 10:26:42 -07:00
twinaphex 7be9aef768 (PSP) Buildfix 2019-07-20 16:56:01 +02:00
twinaphex 5de9f85533 Cleanups 2019-07-19 13:01:45 +02:00
twinaphex 4c69dad0ce Define DEFAULT_MAX_PADS inside config.def.h - get rid of the messy
MAX_PADS macros everywhere
2019-07-19 12:55: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 67c70de8f3 (Drivers joypad) Cleanups 2019-07-16 14:41:09 +02:00
twinaphex f1ea1f1845 (Drivers joypad) Cleanups 2019-07-16 14:39:31 +02:00
twinaphex bf80376d27 Style nits 2019-07-16 14:34:37 +02:00
David Skywalker 89645ac296 fix wrong udev devices order, fixes #9071 2019-07-08 01:27:41 +02:00
twinaphex cec67e412e Revert "(dinput/xinput) Simplifications"
This reverts commit 20e8dfcba5.
2019-07-04 05:20:19 +02:00
twinaphex c55aefef1e (dinput_joypad.c) Cleanups 2019-06-24 05:07:37 +02:00
twinaphex eaf221125a (xinput_joypad.c) Small cleanups 2019-06-23 03:23:16 +02:00
twinaphex 20e8dfcba5 (dinput/xinput) Simplifications 2019-06-21 09:00:59 +02:00
twinaphex ee3208ac39 Integrate video_driver.c into retroarch.c 2019-06-17 15:10:22 +02:00
Yoshi Sugawara 222d3297d2 use preprocessor macros to support compiling using Xcode 11/iOS 13 and older versions of Xcode 2019-06-05 06:50:02 -10:00
Yoshi Sugawara 9e1fcf4031 iOS: Support L3/R3 in iOS 12.1, Options buttons in mfi/PS4/XBox One controllers in iOS 13 2019-06-05 06:21:06 -10:00
Ash Logan 26d3c3634c wiiu/input: Uniquely name axis enum
Griffin!
2019-05-28 09:16:48 +10:00
Ash Logan 9a89aebe73 wiiu/input: Give static variables unique names
For griffin build, where static is meaningless
2019-05-28 09:06:31 +10:00
Exvat e7bf2a345c Add rumble support for the switch 2019-03-11 19:33:02 -07:00
Francisco Javier Trujillo Mata 48d46dcc44 [PS2] Analog support improvement 2019-02-27 19:43:59 +01:00
Brad Parker 4f0d61a2ac update copyright 2019-02-22 19:13:36 -05:00
Francisco Javier Trujillo Mata c147866562 Implemented analog support for ps2 controllers 2019-02-20 19:17:14 +01:00
twinaphex 1daaf7385c 9PS2) Silence some warnings 2019-02-14 07:20:44 +01:00
Yoshi Sugawara b06d75ec99 iOS: check if mfi controller already added to the internal list when connecting 2019-02-05 06:43:14 -10:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
Twinaphex b321753944
Merge pull request #8144 from orbea/coreaudio
Fix warnings.
2019-02-01 19:13:49 +01:00
orbea 5d56080312 Use the posix poll.h instead of sys/poll.h. 2019-02-01 09:58:04 -08:00
orbea 5150d96074 Fix warnings. 2019-02-01 08:40:43 -08: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
twinaphex 4b0b4e727b Cleanups 2019-01-31 15:24:21 +01: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
orbea cb602c190d Some C89_BUILD fixes. 2019-01-20 14:03:42 -08:00
krzys-h d98962189a Fix crash in xinput with verbose logging 2019-01-18 17:50:13 +01:00
orbea ff2e3bbbce Fix CXX_BUILD errors. 2019-01-13 11:51:33 -08:00
twinaphex 4c8e5e07c0 Fix some CXX_BUILD errors 2019-01-12 18:35:14 +01:00
twinaphex b9ff2e4de1 Fix some static code analysis warnings from MSVC 2017 2019-01-10 21:47:15 +01: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 Javier Trujillo Mata 9370fb604d Enable 2 controller for PS2 Driver (multiplayer is not implemented yet) 2019-01-08 00:28:14 +01:00
Francisco Javier Trujillo Mata f48ffb9aac Open RetroArch Menu Long Pressing Start button 2019-01-07 01:38:48 +01:00
krzys-h fce7ca80c1 (UWP) Fix multiple gamepads on xinput 2019-01-05 21:50:58 +01:00
Francisco José García García 4204bfc67f [ORBIS] Add Menu toggle combo and some cleaning 2019-01-02 12:13:17 +01:00
orbea 7ac080ea50 sdl: Flush the joypad events.
Bastien found a fix to the issue
"The lag after 10-15 minutes issue appears to be a bug in the sdl2 input
driver in RetroArch. RetroArch never clears the SDL event queue. After a
while it is so large it takes a significant time to traverse."

Fixes https://github.com/libretro/RetroArch/issues/7868

Solution thanks to Bastien.
2019-01-01 17:16:35 -08:00
Greg V a838582b11 udev: support on FreeBSD via libepoll-shim/libudev-devd 2019-01-01 03:16:33 +03:00
Francisco José García García ea2ed2fb07 [ORBIS] More input driver changes 2018-12-31 00:14:56 +01:00
twinaphex aecd532dac UWP needs this to return true for some reason 2018-12-30 20:03:14 +01:00
twinaphex 74f391de9b This fixes all-non Xinput/Xbox pads - they were all non-working
before
2018-12-30 19:55:37 +01:00
Francisco José García García 4ad083cb97 [ORBIS] Update input driver 2018-12-30 14:00:18 +01:00
Francisco José García García 9c5a934529 [ORBIS] Untested input driver 2018-12-30 01:29:34 +01:00
krzys-h b201d669b5 First iteration of UWP support
Enough to kind of run

Working drivers: xinput, d3d11
Still missing: input driver with keyboard support, audio driver
2018-12-28 22:09:22 +01:00
Francisco Javier Trujillo Mata 90ba2df972 Put proper license in the files for the PS2 development 2018-12-26 13:48:48 +01:00
rsn8887 44cd329125 [LIBNX] Fix switching from Split Joycon mode to Dual Joycon mode 2018-12-05 18:29:28 -06:00
rsn8887 f953962d08 [LIBNX] Fix Split Joycon mode for horizontal holding 2018-12-05 18:12:55 -06:00
Francisco Javier Trujillo Mata fc9cd8f639 JoyPad implemented 2018-11-09 22:40:50 +01:00
Francisco Javier Trujillo Mata 0880bd00b0 PS2 is compiling with null drivers 2018-11-09 22:40:50 +01:00
twinaphex c17135df3e Revert "Use sceCtrlIsMultiControllerSupported to detect"
This reverts commit ef10b7897d.
2018-10-23 02:42:06 +02:00
Twinaphex 50682c9a46
Merge pull request #7014 from mickski56/master
address #6920 Proper analog trigger support
2018-10-12 01:08:39 +02:00
M4xw be85ec4627 [LIBNX] Add Split Joycon support 2018-10-01 00:03:57 +02:00
M4xw 64edf5f879 [LIBNX] Fixups and bare minimum to function 2018-09-14 20:38:42 +02: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
twinaphex d08f0f1234 CXX_BUILD cleanups 2018-07-28 23:18:44 +02:00
mickski56 aa0e0de1d9
address #6920 Proper analog trigger support 2018-07-24 22:48:50 +01:00
TheOfficialFloW ef10b7897d
Use sceCtrlIsMultiControllerSupported to detect 2018-07-24 10:12:15 +02:00
Twinaphex 11244d78b0
Merge pull request #6981 from casdevel/dinput
Add dinput rumble support
2018-07-13 12:20:28 +02:00
twinaphex fab08c9cfb Only load Xinput DLL once 2018-07-12 21:39:18 +02:00
Zoran Vuckovic 544802e1a8 Add dinput rumble support 2018-07-05 20:01:23 +02:00
misson20000 dd0ad28818 NSW: fix analog sticks 2018-05-24 00:18:38 -07:00
gblues 84e9c93c35 quotes for some, braces for others 2018-05-02 22:37:34 -07:00
gblues 27bfcf3c77 Replace angle includes with quote includes
=== DETAILS

Replaced includes for things that aren't standard library headers so
they use quotes instead of brackets.

Also fixed up a couple of headers that had include-order dependencies.
2018-05-02 21:31:00 -07:00
gblues 7448fd3157 More code re-organization
=== DETAILS
Since @aliaspider wants the `wiiu/` to be something of a mini-SDK, I've
reorganized the code I put in there:

- `wiiu/main.c` now only has the ELF/RPX entrypoints, and the code used
  by those entrypoints, with RA code removed (e.g. swapped retro_sleep()
  for usleep()). These entrypoints then call main() ...
- Moved `main()` and its support functions back into `frontend/drivers/platform_wiiu.c`
  I also renamed some of the support functions I wrote, and better
  organized them within the code.
- Moved `wiiu/input/` into the `input/` hierarchy:

  * The joypad drivers now live in `input/drivers_joypad/wiiu/`
  * The HID driver now lives in `input/drivers_hid/`
  * The Wii U specific headers now live in `input/include/wiiu`
  * I added `input/include` into the include search path to avoid
    using really ugly relative includes
2018-05-01 23:23:40 -07:00
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 9bc5a15c2d Enable pads to register in any order
== DETAILS

Whereas the last commit had a hack (that disabled the wiimote
driver in the process), this has.. well, a *different* hack that
allows pads to register in any order.

Note that due to the initialization routines, the gamepad will still
likely always get slot 0. Not sure if this can be overridden via config
or not.

== TESTING

Tested locally with GC adapter
2018-04-01 18:52:26 -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 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
David Demelier e99049a8ff Use EVIOCGID's ioctl to get vendor/product id, #6325
The current code get the USB vendor/product controller, in case of
bluetooth connection this means that you get the bluetooth dongle ids
instead of gamepads. This is not fine as we match gamepads using their
product and vendor ids.

Credits go to SDL which helped me to figure out this issue.

http://hg.libsdl.org/SDL/file/f7c6b974d5af/src/joystick/linux/SDL_sysjoystick.c#l208
2018-02-23 09:19:43 +01:00
Twinaphex 0c3a684e2c
Merge pull request #6192 from gblues/master
Fix memory management bugs
2018-01-28 08:48:21 +01:00
gblues f2ea5dde11 Fix memory management bugs
== DETAILS

 * Fix double-free in hidpad shutdown code
 * Fix possible double-free in hidpad error handling code
 * Fix memory leak in adapter delete method
2018-01-27 22:54:59 -08:00
twinaphex 80b17668b6 Add initial VS2013 solution 2018-01-24 01:29:45 +01:00
twinaphex c5ffd06778 Revert "(xdk_joypad.c) Cleanups"
This reverts commit 49c399217d.
2018-01-21 01:48:28 +01:00
twinaphex 6c73cea470 Revert "Buildfix"
This reverts commit 832cf07247.
2018-01-21 01:48:21 +01:00
twinaphex 832cf07247 Buildfix 2018-01-21 01:44:18 +01:00
twinaphex 49c399217d (xdk_joypad.c) Cleanups 2018-01-21 01:43:19 +01:00
twinaphex 932904e07e (Xbox 360) Buildfixes 2018-01-20 23:42:10 +01:00
twinaphex b7bbf368fe (XBox XDK) Input should work again completely 2018-01-20 23:38:32 +01:00
twinaphex 528e4d8cc4 xdk_joypad_axis - implement case 4/5 for Xbox 360 2018-01-20 19:57:14 +01: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 13da6bf4a2 With Xbox OG, some of the face buttons are analog buttons -
need to implement this in _button callback function
2018-01-20 19:34:01 +01:00
twinaphex b4bb6e2ef4 Start making xdk_joypad code more similar to PC code 2018-01-20 19:05:39 +01:00
twinaphex 64e0861aee remove iteration variables 2018-01-20 18:57:19 +01:00
twinaphex 3ba978caa9 Make axis function more like PC version 2018-01-20 18:55:28 +01:00
twinaphex e16d962c01 Start getting rid of analog_state 2018-01-20 18:54:21 +01:00
twinaphex f25306ba22 memset g_xinput_states to 0 2018-01-20 18:50:24 +01:00
twinaphex 03a745e5b4 Remove xdk_joypad_get_buttons 2018-01-20 18:47:39 +01:00
twinaphex 0550b22a35 (XDK) Buildfix 2018-01-20 18:46:13 +01:00
twinaphex f74e399bdf Start rewriting xdk_joypad.c 2018-01-20 18:44:35 +01:00
twinaphex 41575a63ac (XDK joypad) Cleanups 2018-01-20 17:59:59 +01:00
twinaphex e6f637ea6b Set autoconfig binds for Xbox 2018-01-20 03:14:17 +01:00
twinaphex d01b9c4a09 Cleanups 2018-01-19 21:25:35 +01:00
twinaphex 82f721145c (XDK) Refactor xdk_joypad.c 2018-01-19 21:24:28 +01:00
twinaphex b4b5ed1630 Rely on xbox input subsystem to attach/detach gamepads 2018-01-19 07:02:47 +01:00
twinaphex 0731a79a4f Pass this to XInputOpen 2018-01-19 06:56:44 +01:00
twinaphex f71bbeae9f (XDK) Try to autodetect all pads at startup 2018-01-19 06:49:52 +01:00
twinaphex 61ff51be2f Start using string_is_equal predominantly 2018-01-16 22:53:38 +01:00
Toad King 4fd750b48a add builtin autoconf script for emscripten gamepads with "standard" mapping 2018-01-14 04:24:37 -06:00
Toad King b3900217da clamp axis values to -1.0 - 1.0, at least firefox can report values outside that range 2018-01-14 03:43:23 -06:00
Toad King 1f8a85615c don't always clear poll state 2018-01-14 02:34:38 -06:00
Toad King de3581de73 fix analog sticks 2018-01-14 01:35:28 -06:00
Toad King 15c3f56b37 fix phantom button presses 2018-01-14 01:00:46 -06:00
Toad King 21d928ba0e add joypad driver for emscripten 2018-01-14 00:15:30 -06:00
gblues 5894d0ef86 Remove all HID code from WiiU build via ifdef
== DETAILS
We're trying to track down the source of crashes when switching cores.
To rule out the HID code, this commit does the following:

- Wraps the library imports in an ifdef
- Wraps the object files in conditionals in Makefile.wiiu
- In wiiu_joypad, calls into the hidpad driver are wrapped in ifdef

== TESTING
This didn't solve the "System memory error" crash I've been experiencing.
But, maybe it will impact the other flavors of crashes others are seeing.
2018-01-07 20:26:24 -08:00
vgmoose 890de0e79b allow joycons to work while attached 2018-01-07 12:10:28 +01:00
twinaphex edb8ecdbf8 (xdk_joypad.c) Add C codepath for XGetDeviceChanges 2018-01-03 14:13:29 +01:00
twinaphex 2884ad2d73 (360) Some buildfixes 2017-12-31 06:09:39 +01:00
misson20000 7cc614263a (NSW) add default button bindings and fix right joystick 2017-12-31 03:04:11 +01:00
Twinaphex 0389bc64fe
Merge pull request #5997 from libretro/new_hid
New HID system (courtesy of gblues)
2017-12-30 15:30:03 +01:00
twinaphex 20bb653f1e (Xbox 360) Buildfixes 2017-12-30 12:36:00 +01:00
gblues 52c754cfa8 Split wiiu_gamepad into three sub-drivers
== DETAILS
Well, after a lot of code analysis, this seems like the
best way to handle things on the Wii U without also completely
re-architecting the I/O handling in RetroArch.

How it works:

- the top-level wiiu_joypad driver is now nothing more than a
  delegator.
- the wiiu-specific drivers live in `wiiu/input/`
- wpad_driver.c handles the WiiU gamepad
- kpad_driver.c handles the wiimotes
- hidpad_driver.c will handle HID devices like the GC adapter, DS3/DS4, etc.

  (I say "will" because this isn't implemented yet)

== TESTING
Haven't actually tried the build to see if it works, but it does
compile.
2017-12-30 04:43:18 +01:00
gblues c1496a8600 WIP - reorganizing input data
== DETAILS

Looking at the apple input driver gave me an idea--moving the
HID driver into the wiiu_input_t data instead of piggy-backing
it off the wiiu_joypad driver.

- Remove changes to wiiu_joypad
- Add equivalent to wiiu_input

This is probably broke as hell. Haven't tried to compile.
2017-12-30 04:40:43 +01:00
gblues 1beba28d02 Only call HIDSetup/HidTeardown once
== DETAILS
I did a minimalist edit of the HID thread that stripped out all
HID* syscalls, and this stopped the crashing. I then re-added just
the HIDSetup() and HIDTeardown() calls, and the crash came back.

This smells like an OS bug. To work around it, I've put the
HIDSetup() and HIDTeardown() calls into the app init/shutdown
section, so they only get called once in the application lifetime
and not each time the input driver is initialized.
2017-12-30 04:40:15 +01:00
Nathan Strong e80d99dbae Delete controller_patcher; start on proper HID driver
== DETAILS

We discovered that the controller_patcher code was causing
the WiiU to intermittently crash when switching ROMs.

Changes:

- Completely extricates the controller_patcher code
- Create a skeleton wiiu_hid driver
- Wire up the build system to build/link it successfully

== TESTING

Has not been tested. Probably doesn't crash, since the
skeleton driver is just a copy of the null driver.
2017-12-30 04:38:57 +01:00
twinaphex 5c876647ed (NSW) Small cleanups 2017-12-29 00:45:00 +01:00
misson20000 6d2a7b1f26 Nintendo Switch (libtransistor) port 2017-12-29 00:10:01 +01:00
Brad Parker 6d484b7724 xinput: check for valid function pointers before calling them 2017-12-23 23:02:29 -05:00
gblues 0f7de204f7 Last batch of whitespace cleanup (post-rebase)
-- looks like a few files committed with DOS line endings
2017-12-12 00:24:46 -08: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