This reverts commit 6b4ae68460.
It turns out this deadlock is possible for any joystick event delivery combined with an event watcher that locks joysticks. I'm reverting this change for now, and will be working on a better global solution for this problem.
(cherry picked from commit 76560f9e47)
There's no need to use the "A" version of GetModuleFileName on GDK; it returns
a UTF-8 string directly on this platform, but we can still use the UTF-16 "W"
version and cut down on code duplication.
This code runs once and caches the results, so we can take the one-time string
conversion overhead.
(cherry picked from commit 6b780c5ff9)
This could set the pending flag even if there was no state change requested, which would cause errant sync timeouts in certain situations.
(cherry picked from commit 6a3b0413dc)
(for SDL_PROP_APP_METADATA_NAME_STRING if unset. If SDL_GetExeName() returns
NULL, it'll fallback to good ol' "SDL Application", as usual.)
Fixes#15692.
(cherry picked from commit a49ba90257)
core/unix had a more-limited copy of filesystem/unix's implementation, called
SDL_GetExeName(). Replace that with a real implementation in filesystem, and
allow each platform to implement it as appropriate.
Implemented for Unix and Windows; most implementations are currently FIXME
stubs at the moment.
Reference Issue #15692.
(cherry picked from commit 7d29ce8e31)
If a mode with a closer refresh was found, but it had the same color depth as the current best match, it was being dropped. Only ignore the new mode if the color depth is below the current best match.
(cherry picked from commit cd0b796a6e)
This product doesn't appear to use the DualSense protocol. On Android this shows up as two interfaces that don't send reports that we can parse.
(cherry picked from commit a84dafd5b9)
If the VM was already running, and then a file failed to open at all (a
directory was dropped on the window, etc), this wouldn't go back to showing
the help text.
(cherry picked from commit 6c55fad411)
This doesn't need a render target to function. The comment suggested it was
needed to make debug text look better when scaled, but maybe logical
presentation used to do linear scaling exclusively at the time?
(cherry picked from commit 800f347e5e)
This prevents them from being interpreted as keyboard keys by the Java code, and if internally we are treating them as keyboard keys, they'll be repeated properly.
Fixes https://github.com/libsdl-org/SDL/issues/15664
(cherry picked from commit 3545bad589)
XInput2 can send slave button presses before FocusIn events, which can confuse the click-through suppression logic. A window must have keyboard focus to grab the mouse anyway, so ignore slave presses when lacking keyboard focus.
(cherry picked from commit ef9a5b7040)
XInput2 may send mouse buttons presses on both the master and slave devices, and the click-through button event should be ignored on both if required.
(cherry picked from commit 8371c09aa7)
7e994d8671 - authored by
Izumi Tsutsui:
netbsd: check not only addr 0 but also addr 1 to find root hubs
On NetBSD xhci(4) uses 'addr 0' for the root hub but all drivers for
other host controllers use 'addr 1' for the root hub.
https://gnats.netbsd.org/60073
(cherry picked from commit 169480a352)
It turns out this change causes a deadlock:
The main UI thread calls synchronized handleMotionEvent() which then calls SDL_LockJoysticks()
The main app thread calls SDL_LockJoysticks() and then synchronized pollInputDevices()
(cherry picked from commit 8c89a076a7)