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)
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)
This simply toggles a flag that rejects DnD offers if false. Events were previously dropped silently, but rejecting the offer makes some desktops display a proper icon when the drop will not work.
(cherry picked from commit 336d07c2b7)
Safari's older Gamepad API exposes `vibrationActuator` with `playEffect`
and `reset` but no `effects` enumeration array. The probe added in
651136ac7 dereferences `vibrationActuator['effects']['includes']`
unconditionally, throwing `TypeError: undefined is not an object` on
every Safari client that opens a connected gamepad. Add the missing
`['effects']` null check so the probe returns false on Safari instead
of aborting.
(cherry picked from commit db7ac820f9)
start/end should be FriBidiStrIndex here -- using FriBidiLevel makes
them `signed char` and the loop here will become infinite if `end` is
> 127.
(cherry picked from commit 0ffb0bdd87)