3107 Commits

Author SHA1 Message Date
twinaphex
fab08c9cfb Only load Xinput DLL once 2018-07-12 21:39:18 +02:00
radius
717e45dc52 Add mouse wheel support
enable hold to bind on android

cleanup
2018-06-29 21:12:47 -05:00
radius
fef9b63bc0 Revert "Disable ENABLE_TOUCH_SCREEN_MOUSE for now until issues are resolved"
This reverts commit 2b026165125f2f8fc5b04f92099f231999507b98.
2018-06-29 21:12:47 -05:00
Twinaphex
fd11b205da Silence bunch of warnings 2018-06-21 07:52:01 +02:00
Twinaphex
467aa30131 Cleanups 2018-06-21 07:26:05 +02:00
twinaphex
981b0eec91 Take this out 2018-06-19 06:28:38 +02:00
twinaphex
54a95eed83 These defines are not available on Android NDK APIs lower than 24 2018-06-18 01:56:22 +02:00
Gregor Richards
af357c1afe Fix input when the joypad driver is NULL. 2018-06-01 23:22:04 -04:00
Twinaphex
743ab2351c
Merge pull request #6829 from fr500/overrides
only apply deadzone on analog to digital remapping, not analog to analog
2018-05-27 21:08:52 +02:00
radius
c2c5265916 only apply deadzone on analog to digital remapping, not analog to analog 2018-05-27 11:58:52 -05:00
misson20000
dd0ad28818 NSW: fix analog sticks 2018-05-24 00:18:38 -07:00
Tatsuya79
dd3c9dd838
call input_remapping_set_defaults before loading a new remap 2018-05-16 13:30:57 +02:00
radius
f81ea09f20 add saving, deletion options for per-dir remaps 2018-05-13 23:17:44 -05:00
rsn8887
6d5115a50d (Vita/PSP) Use proper button labels, fix inverted R-Stick Y axis 2018-05-09 22:55:33 -05:00
Twinaphex
8484ea4154
Merge pull request #6672 from gblues/master
Cleanup of Wii U launcher code
2018-05-06 15:24:00 +02:00
ceb33
bafd2af885 remove custom debug output 2018-05-05 13:33:15 +02:00
ceb33
67784c85cf update and merge to current Retroarch version 2018-05-05 12:59:04 +02:00
ceb33
9008684651 re-add callback to manage usb device plugged in while retroarch is running 2018-05-05 12:48:01 +02:00
Twinaphex
de1bf58997 Buildfix 2018-05-03 20:39:03 +02:00
twinaphex
3796e52018 (OSX) Go back to old code - connect handler was broken 2018-05-03 20:31:28 +02:00
Twinaphex
909ffd4de4
Update input_driver.c 2018-05-03 15:28:26 +02:00
twinaphex
4fac2b339c Remove unused variable 2018-05-03 13:20:05 +02:00
twinaphex
28025802da Try to fix build failure 2018-05-03 13:11:38 +02:00
gblues
84e9c93c35 quotes for some, braces for others 2018-05-02 22:37:34 -07:00
radius
7bdbd005a8 fix #6700 2018-05-02 23:32:40 -05: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
twinaphex
eac899f573 Try to fix build for targets that don't have HAvE_OVERLAY defined 2018-05-02 13:52:27 +02: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
radius
3304dad729 fix #6631 2018-05-01 18:09:04 -05:00
Brad Parker
a1aefc901c Qt WIMP GUI 2018-04-30 14:33:05 -04:00
radius
7b82c8a9bc fix #6644 2018-04-28 11:56:21 -05:00
radius
5e1a698fa2 fix #6644 2018-04-28 11:42:48 -05:00
gblues
f378e2bfcf Fix WaveBird support for the Wii U GCA
== DETAILS
Thanks to JacobM at GBAtemp for helping me test this.

The WaveBird wasn't being properly picked up due to the port status byte
being different from normal GC controllers. (Why? who knows. Probably
so games could detect the WB and show WB-specific OSDs).

This implementation should be more future-proof, to handle any other
unexpected status bytes.
2018-04-25 21:28:33 -07:00
Twinaphex
6ac4032735
Merge pull request #6580 from gblues/gblues/hid
Working HID driver for Wii U [TESTING NEEDED]
2018-04-25 23:10:39 +02:00
gblues
f6b33b1d30 missing file 2018-04-24 06:37:02 -07: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
f7135bcee6 Fix analog reading on GCA
== DETAILS
After a little trial and error, I got analog input working for the
Wii U GC adapter.

DS3 might work, but it's untested.
2018-04-22 23:47:07 -07:00
gblues
ed742c48e0 Fix hotplugging
== DETAILS
So, it turns out that there *is* a autoconfig disconnect handler. Took digging
through tasks/task_autodetect.c to find it!

So, I added a call to the handler when the pad gets disconnected.

This seems to solve the problem of the pad not disappearing from the menu.

(At the very least, the user's pad index reverts to "none" which is still
an improvement)

== TESTING
Tested manually, made sure it didn't crash or leak slots.
2018-04-22 17:34:20 -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
53738e4a0d Allow Wii U GCA to work without 2nd cable attached
=== DETAILS

So, the GCA has 2 USB connections; one is the data connection, and the
second is used to drive rumble.

Due to a driver bug, if the second cable wasn't attached, the pads wouldn't
get detected.

I fixed that bug.
2018-04-18 23:12:45 -07:00
radius
8198e5c0b2 fix #6596 2018-04-19 09:54:16 -05:00
gblues
6eebbe4213 Build fix for PC
== DETAILS
Hooray for conditional compile directives.

Moving things around broke things in unexpected ways on non-WiiU builds.

Well, not *completely* unexpected. But still.

Changes:

- Move some typedefs around to avoid circular include dependencies
- Include the file where the HID driver definition got moved to

== TESTING
- verified build for Wii U still runs successfully
- did a local build without any errors (some weird warnings, but since they
  happen in code I didn't change, I'm assuming they're pre-existing?)
2018-04-15 00:04:49 -07:00
gblues
4cd301bd92 Add pad unregistration
== DETAILS

I think this will fix the problem with duplicate pads--pads weren't properly
de-initializing and registering as disconnected. When a pad is disconnected,
the slot should properly release now.
2018-04-14 21:30:44 -07:00
gblues
6ab91a422e Small cleanup to adapt to upstream code changes
retro_bits_t turned into input_bits_t and there were parts of my
code that needed to update.

== TESTING
No idea if upstream changes broke anything, but it compiles cleanly
now.
2018-04-14 14:34:13 -07:00
gblues
fb5b31faf3 Merge branch 'master' into gblues/hid 2018-04-14 14:18:03 -07:00
gblues
97e09d179f Fix deadlocks when device is unplugged
== DETAILS
TIL that it's bad to call synchronization code from callbacks.

To avoid that, I made the following changes:

- Implemented an atomic swap (see previous commit) to avoid explicit
  locking when working with the event list
- ensure locks are only acquired in either the main thread or the
  I/O polling thread
- use an explicit polling loop; we still use async reads, but the
  read doesn't immediately re-invoke itself.
- remove the sleep in the polling thread.
- remove unnecessary locking in the thread cleanup call--verified that
  the list can't be modified while it is being executed.

== TESTING
I tested locally, and was able to disconnect/reconnect USB devices several times without the worker thread getting deadlocked.
2018-04-14 13:30:34 -07:00
gblues
dca36ebaf8 Add small snippet for atomic value swapping
Fortunately, the gcc port implements the builtins and, from basic
testing, they seem to work.

This is only really useful on Wii U--other platforms have more
robust atomic operations, or aren't using gcc to build.
2018-04-14 01:26:26 -07:00
twinaphex
6761ec471d Silence some Coverity warnings 2018-04-12 21:39:31 +02:00
twinaphex
0fb766b921 Move variables 2018-04-09 16:15:31 +02:00
twinaphex
be5057eafc Cleanups 2018-04-09 00:38:44 +02:00