43161 Commits

Author SHA1 Message Date
gblues
46dad14d5f Merge branch 'master' into gblues/hid 2018-04-03 20:30:06 -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
Twinaphex
0b62a0f6e2
Merge pull request #6519 from bearoso/master
Add workarounds based on window manager for override-redirect.
2018-04-03 04:05:26 +02:00
twinaphex
00a3aba480 Define HAVE_RUNAHEAD for dynamic linked iOS 2018-04-03 03:48:59 +02:00
Brandon Wright
9f15e39114 Also use the original fallback designed for older window managers. 2018-04-02 20:21:32 -05:00
Brandon Wright
0a5e65dc06 Add workarounds based on window manager for override-redirect. 2018-04-02 20:01:14 -05: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
Twinaphex
ab00d587d8
Merge pull request #6510 from bearoso/master
Add back override-redirect to allow G-SYNC
2018-04-02 01:57:27 +02:00
Twinaphex
19a6375ec6
Merge pull request #6509 from Dwedit/master
Make RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE work on the secondary core
2018-04-02 01:56:43 +02:00
Dwedit
a275242aef C89 compliance and line spacing rules 2018-04-01 17:54:03 -05:00
Brandon Wright
8356300c3e Apply the same fix to xegl_ctx.c 2018-04-01 17:47:47 -05:00
Brandon Wright
64686d8106 Set override-redirect on true fullscreen, but after window is mapped. 2018-04-01 17:47:27 -05:00
Dwedit
78c8a9b197 Make RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE work on the secondary core 2018-04-01 17:34:54 -05:00
twinaphex
015facee70 (XMB) Cleanups 2018-04-01 18:23:37 +02: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
Twinaphex
28b9a38d7d
Merge pull request #6504 from Dwedit/secondary_core_bug_fix
Fixed initializing controller port map.
2018-03-31 21:09:02 +02:00
Dwedit
80b8410b0f Forgot to initialize controller port map, this caused VBA-M to crash when creating the secondary core. Now fixed. 2018-03-31 12:15:14 -05:00
Twinaphex
611cc52661
Merge pull request #6500 from Tatsuya79/master
XMB Right Thumbnail rework.
2018-03-31 14:13:25 +02:00
Twinaphex
f7fa5844f2
Merge pull request #6502 from Dwedit/master
Runahead: Stop savestate transmission in netplay
2018-03-31 11:36:46 +02:00
gblues
39e4167df6 Start work on DualShock 3 driver
== DETAILS

The WiiU GC adapter is working!

Next up: DualShock 3

I have the skeleton of the driver started, need to work out the
activation packet.

== TESTING

The DS3 driver is broke as hell right now.
2018-03-30 23:00:14 -07:00
Dwedit
6b77a66298 get rid of the unnecessary typedef 2018-03-31 00:55:37 -05:00
Dwedit
15472eb184 Stop savestate transmission in netplay 2018-03-31 00:45:20 -05:00
Twinaphex
a869cb5a7d
Merge pull request #6501 from Dwedit/fast_savestate_flag_2
Fast Savestate and Hard Audio Disable flags in RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE
2018-03-31 04:54:09 +02:00
twinaphex
9164bcc244 Add HAVE_RUNAHEAD to Android 2018-03-31 04:22:18 +02:00
gblues
d65bd90e67 Fix GC pad button mapping 2018-03-30 18:57:34 -07:00
Dwedit
36d33deb30 Add message about load state expected to succeed. 2018-03-30 20:41:52 -05:00
Dwedit
ec6d6e58d6 Fast Savestate and Hard Audio Disable flags 2018-03-30 20:35:52 -05:00
Tatsuya79
0c0cad8630 XMB Right Thumbnail rework. 2018-03-30 23:53:16 +02:00
twinaphex
cf4ab13281 Revert "Silence some Clang static analyzer warnings"
This reverts commit 2c882a01c12cd3104964c70f95b4037fdd6dc4e5.
2018-03-30 19:28:37 +02:00
twinaphex
b24433a9f2 Hack - make diagonal 5.0f for mobile, 6.5f for desktop 2018-03-30 16:05:45 +02:00
twinaphex
92b46a8275 Some cleanups 2018-03-30 15:50:27 +02:00
Twinaphex
0ff5631649
Merge pull request #6499 from Tatsuya79/patch-1
Make MUI auto dpi a bit bigger for low dpi phones
2018-03-30 15:47:17 +02:00
Tatsuya79
74d4e6043a
Make MUI auto dpi a bit bigger for low dpi phones 2018-03-30 15:44:39 +02:00
twinaphex
8acc085dec (input_overlay.c) Get rid of some forward declarations 2018-03-30 13:57:50 +02:00
twinaphex
94254e4c79 (IOHIDManager) Cleanups 2018-03-30 11:49:25 +02:00
Twinaphex
86bfd8f4fc
Merge pull request #6497 from ceb33/master
fix to have a deterministic HID device registration
2018-03-30 11:40:24 +02:00
ceb33
c6d6fc7098 fix memory leak 2018-03-30 11:00:38 +02:00
ceb33
82e2cc7c73 set hid device registration deterministic (sorting by ascending location_id), this solve the issue where game with same vid and pid where sometime swapped by the OS 2018-03-30 10:43:54 +02: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
gblues
1eea48d0c8 Fix crash on exit bug
== DETAILS

Turns out freeing memory that's already been freed is.. bad.

Fix two double-free instances; one due to over-freeing and the other
due to wrong order-of-operations causing a double free.

Also updated logging a little.

== TESTING

The GC adapter still clobbers slot 0, but the "emergency exit" sequence
works to quit RA cleanly.
2018-03-29 23:37:11 -07:00
gblues
6b43defc98 Less verbose logging 2018-03-29 23:37:11 -07:00
gblues
8a4c5086fb Finish HID implementation for WiiU GCA adapter
== DETAILS

(I think)

- Uncomment the call in the read loop to start feeding packets to the
  driver
- implement the GCA packet driver
- implement the pad interface
- fix indentations in GCA driver

== TESTING
Compiles. Haven't tested yet.
2018-03-29 23:37:11 -07:00
gblues
180d6a28bf Fix up HID device driver initialization
== DETAILS
Turns out the cause of the crash was a bad cast, resulting in a
function call to nowhere.

Also, I think the DSI exception handler only works on the primary core;
when this was happening in the background thread, I got a black
screen error instead.

Next up: finishing up the GCA driver.
2018-03-29 23:37:11 -07:00
gblues
dc6f4c23ed Rename hid_driver_instance members for clarity 2018-03-29 23:37:11 -07:00
gblues
4b9d5c0ab7 Start implementing "detach" code path
== DETAILS
We're at a point where we need to do more than just
clean up a local data structure, so I've started
implementing the "detach" part of the code so that
everything gets cleaned up properly.

Also, added error handling inside the polling
thread.

== TESTING

Have not tested yet.
2018-03-29 23:37:11 -07:00
gblues
0100d58ffb WIP: evolve driver implementation
== DETAILS

I've created the concept of a hid_driver_instance_t which is basically
a central place to store the hid pad driver, hid subsystem driver,
the pad list, and the instance data for the above in a central location.

The HID pad device drivers can use it to perform HID operations in a
generic manner.

This is more-or-less a pause point so I can catch up with upstream.

== TESTING

Haven't tested this yet. Compiles without warnings though!
2018-03-29 23:37:11 -07:00
gblues
41ce8853d7 Add name for hid device; implement detect
== DETAILS

- detect() methods in device_* files now check for VID/PID
  instead of just returning false
- add "name" field on hid device, mainly for logging purposes

== TESTING
Verified my WiiU GC adapter detected properly
2018-03-29 23:37:11 -07:00
gblues
ae19eed00f implement hid device search 2018-03-29 23:37:11 -07:00
Brad Parker
ecd42f1aa8 C89 buildfix, correct spacing 2018-03-29 22:15:16 -04:00