43383 Commits

Author SHA1 Message Date
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
ef36744859 Start implementing fall-back to async read
== DETAILS

The Wii U GC adapter doesn't seem to like doing async reads if it is connected
via a USB hub. It seems to be device-specific, though, because my DS3 works
just fine through the same hub.

I tried creating a fallback to synchronous reads, but it resulted in a hard
lock of the system. So, for the time being, it's going to be a known
limitation. Might be solved by using a powered USB hub.

Learned that the cache alignment is 64, not 32, so the alignment math has
been updated. Thanks, @aliaspider for that info.
2018-04-20 21:58:45 -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
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
Twinaphex
79071bd11b
Merge pull request #6577 from Stevoisiak/settings-rename-ui
retroarch.cfg: Rename "UI" to "User Interface"
2018-04-14 21:20:15 +02:00
Steven M. Vascellaro
9d352af3a8
retroarch.cfg: Rename "UI" to "User Interface"
Use full name for UI to match the terminology when changing settings in RGUI.
2018-04-14 15:17:40 -04:00
Twinaphex
a20d53202d
Merge pull request #6576 from RobLoach/patch-30
libretro-db: Show missing key match warning once
2018-04-14 20:47:53 +02:00
Twinaphex
3c7c8871d7
Merge pull request #6575 from RobLoach/patch-29
libretro-db: Ignore compiled binaries
2018-04-14 20:47:39 +02:00
Rob Loach
d44f9467e4
libretro-db: Fix whitespace 2018-04-14 14:10:40 -04:00
Rob Loach
d3bbdb2e06
libretro-db: Show missing key match warning once
Before, the "missing match" warning would appear for every entry. This change makes it show that it only displays the warning once.
2018-04-14 14:09:46 -04:00
Rob Loach
b0a2df41dd
libretro-db: Ignore compiled binaries
This makes it so that the compiled libretro-db binaries are ignored from git.
2018-04-14 14:08:28 -04: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
6f7b8aac8c Add input/input_mapper.c always 2018-04-14 03:25:58 +02:00
Twinaphex
7c5e44ead0
Merge pull request #6568 from nurupo/cxxdoesntlag
CXXLAGS -> CXXFLAGS
2018-04-13 18:49:36 +02:00
Twinaphex
4c39a7fd78
Merge pull request #6571 from hiddenasbestos/retro_opendir_r2
retro_opendir - Improved fix for bad input
2018-04-13 18:47:02 +02:00
David Walters
adf4ed960e Handle null and empty string calls to retro_opendir with a consistent null return. 2018-04-13 10:31:21 +01:00
Maxim Biro
6f9c2da807 CXXLAGS -> CXXFLAGS
C++ definitely doesn't lag!
2018-04-13 03:35:33 -04:00
Twinaphex
8fe51864a6
Merge pull request #6566 from gingerbeardman/graphics
3DS icon and banner update
2018-04-13 03:04:31 +02:00
gingerbeardman
e1637ffa20 icon changes 2018-04-13 01:29:15 +01:00
gingerbeardman
f8b75482e9 icon and banner update and refresh
new icons: freeintv
redrawn icons: 81, nekop2, np2kai
tweaked icons: fceumm,  mednafen_pce_fast, nestopia, o2em, picodrive
new banners: freeintv
tweaked banners: 81

all images have also been optimised
2018-04-13 01:15:26 +01:00
twinaphex
dc61e23a21 Update libretro-common 2018-04-13 01:10:10 +02:00
Twinaphex
bd2b913bc6 Silence more warnings 2018-04-13 00:52:52 +02:00
twinaphex
041670fe02 Get rid of multitude of casting warnings 2018-04-13 00:47:42 +02:00
twinaphex
1751f4a0af Make it possible to read bigger files by replacing ssize_t with int64_t
and size_t with uint64_t
2018-04-13 00:18:11 +02:00
twinaphex
70abbbf4fb Revert "Revert "(PS3) Set GCC for PS3""
This reverts commit 249abcd10861a8c10c66230192c5f499ca85d995.
2018-04-12 23:46:41 +02:00
Twinaphex
ff18a55f06
Merge pull request #6565 from fr500/master
remap-redux: try to fix more warnings
2018-04-12 21:39:46 +02:00
twinaphex
6761ec471d Silence some Coverity warnings 2018-04-12 21:39:31 +02:00
radius
9a355b8f2e remap-redux: try to fix more warnings 2018-04-12 14:20:38 -05:00
twinaphex
6e4cf412f0 (menu_entry_playlist_start_entry) This code seems to be unnecessary now? 2018-04-12 21:02:54 +02:00
twinaphex
e7bed050bc Fix memory leak 2018-04-12 20:54:06 +02:00
twinaphex
249abcd108 Revert "(PS3) Set GCC for PS3"
This reverts commit 5486894e3bea860a586a7d82cb77362a3f0a1c32.
2018-04-12 20:30:35 +02:00
twinaphex
5486894e3b (PS3) Set GCC for PS3 2018-04-12 20:16:58 +02:00
Twinaphex
38525e1e8f
Merge pull request #6564 from Tatsuya79/patch-1
MUI Scale mouse cursor like icons.
2018-04-12 18:58:50 +02:00
Tatsuya79
3f77a6a320
MUI Scale mouse cursor like icons. 2018-04-12 18:56:54 +02:00
Twinaphex
c5c41efc0f
Merge pull request #6563 from hiddenasbestos/retro_opendir
patch retro_opendir to handle nullptr and empty-string input
2018-04-12 16:38:51 +02:00
David Walters
801ecb019a patch retro_opendir to handle nullptr and empty-string input 2018-04-12 12:44:42 +01:00
Twinaphex
872c364f34
Merge pull request #6561 from Dwedit/br_encoding_fix
Change encoding of msg_hash_pt_br.h from Windows-1252 to UTF-8
2018-04-12 02:28:10 +02:00
twinaphex
97cf6613da (XMB/Shaders) Reimplement menu shader loading for GLSL/Cg/HLSL backends - if
XMB is selected, it will compile the shader pipelines in
advance
2018-04-12 02:20:17 +02:00
Dwedit
9252c56142 Change Windows-1252 encoded file back to UTF-8 2018-04-11 17:10:46 -05:00
twinaphex
74a3677eb5 Silence warning 2018-04-11 06:14:55 +02:00
twinaphex
abad1b3134 Revert "(menu) Start passing menu_handle to action_ok callback"
This reverts commit d2a1c39f4b4e4aa874dcf21fa0f4272a7cf73662.
2018-04-11 06:12:26 +02:00
twinaphex
1836d08b33 Revert "Start passing around menu_driver_data around properly"
This reverts commit 7c314a91650c9b4d74222bbdefa37e014fa4ae0d.
2018-04-11 06:12:14 +02:00
twinaphex
b540ae3d4d Revert "Update"
This reverts commit 21ede63df2ad2bd7d6d0f92b107d9202746f1c23.
2018-04-11 06:12:08 +02:00
twinaphex
146c94a86a Revert "(iOS) Buildfix"
This reverts commit 15142fd0a98b0761c883366f817dd92326352ab9.
2018-04-11 06:12:01 +02:00
twinaphex
6c99acb23e Revert "Pass around void pointer data - menu handle"
This reverts commit b4a2bd5156354b084283165be96d43ee99bf50ec.
2018-04-11 06:11:54 +02:00