Some sensors will occasionally report two identical timestamps in a row.
This leads to the timestamp wrapping calculation to underflow, subtracting
0x80000000 from the timestamp whenever it happens. By adjusting the wrap
test, we can just directly add zero to the timestamp, fixing the underflow.
(cherry picked from commit 687a59f277)
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)