Commit Graph

13233 Commits

Author SHA1 Message Date
Rachel Blackman
8c12ce1760 Add support for new Steam Controller on Android (#15044)
(cherry picked from commit 46e553a44c)
2026-05-28 11:41:57 -07:00
Sam Lantinga
463d8ddf85 Fix mistyped output report message for Steam Controller
This caused hiccups in BlueZ BT driver for Linux

(cherry picked from commit bb3c61390a)
2026-05-27 18:21:13 -07:00
Sam Lantinga
385f7db161 Add support for new Steam Controller input report
(cherry picked from commit f7a8801227)
2026-05-27 18:21:13 -07:00
Rachel Blackman
f6f1376cbd OpenVR: Actually quit correctly if we get a close/quit message.
(cherry picked from commit a7ecd5f777)
2026-05-27 17:40:58 -07:00
Sam Lantinga
9fe4e5cc87 Revert "android: fixed a possible joystick-related deadlock on application termination"
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)
2026-05-27 13:08:45 -07:00
Ryan C. Gordon
b8601dc8a7 filesystem: Implement SDL_GetExeName() for all platforms.
(cherry picked from commit d7ba3efe6b)
2026-05-27 15:42:41 -04:00
Ryan C. Gordon
11e13dc4a5 gdk: Just use WIN_GetModulePath().
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)
2026-05-27 15:42:20 -04:00
Frank Praznik
5dc7a5daed x11: Fix boolean/enum comparison
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)
2026-05-27 12:16:01 -04:00
Ryan C. Gordon
eee7164d9d x11: SetupWindowData shouldn't add to videodata->windowlist until success.
Fixes #15676.

(cherry picked from commit 22fb9edd5c)
2026-05-27 11:45:31 -04:00
zanadoman
a21c31aea1 GPU: Return early in SDL_WaitForGPUFences if num_fences is 0
(cherry picked from commit d7b1255484)
2026-05-27 08:24:53 -07:00
Ryan C. Gordon
58c2de8e25 metadata: SDL_GetAppMetadataProperty() now uses SDL_GetExeName().
(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)
2026-05-26 20:34:28 -04:00
Ryan C. Gordon
2621d7aab2 filesystem: Added SDL_GetExeName().
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)
2026-05-26 20:33:44 -04:00
Frank Praznik
483d86588c video: Only ignore modes with a lower color depth in SDL_GetClosestFullscreenDisplayMode()
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)
2026-05-26 18:28:41 -04:00
Sam Lantinga
33ea9c3e63 Don't use the HIDAPI driver with Backbone One PlayStation Edition Gen 2
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)
2026-05-26 14:17:19 -07:00
Anonymous Maarten
452348acf8 _uitoa does not exist
(cherry picked from commit 08e338f45c)
2026-05-25 18:40:43 +03:00
Sam Lantinga
5720f54059 Fixed building with older versions of GameInput
(cherry picked from commit f8d5628163)
2026-05-22 16:07:46 -07:00
Jason Millard
efe6062cf4 iOS: Fix SDL_EVENT_DROP_FILE lost on cold start from URL open
(cherry picked from commit 290f0c831f)
2026-05-22 07:17:06 -07:00
Bitwolf
386be0070b Update Famicom controllers to a more user friendly name.
(cherry picked from commit 2f13731d23)
2026-05-22 07:15:35 -07:00
Vittorio Romeo
e8eba4a406 emscripten: dedupe keyboard event listeners across multiple windows
(cherry picked from commit 7f03da9588)
2026-05-22 07:11:44 -07:00
kholo
05191b0c7d Ignore Huion Tablet Kamvas Pro 22
(cherry picked from commit 2bb6df90ad)
2026-05-22 07:06:35 -07:00
Sam Lantinga
9a1ba9f811 android: fixed a possible joystick-related deadlock on application termination
(cherry picked from commit 6b4ae68460)
2026-05-21 12:20:50 -07:00
Sam Lantinga
cbea661f54 Fixed build
(cherry picked from commit fe1918a47f)
2026-05-21 10:05:29 -07:00
Sam Lantinga
48888a3865 Fixed Ipega controllers being ignored in keyboard mode (thanks @AntTheAlchemist!)
(cherry picked from commit 13f91a67fc)
2026-05-21 09:56:53 -07:00
Sam Lantinga
5bd0eb068c Fixed a rare crash on Raspberry Pi when creating a window
(cherry picked from commit 19d73016e8)
2026-05-20 15:11:26 -07:00
Sam Lantinga
257de23efc Fixed a rare crash on Raspberry Pi when creating a window
(cherry picked from commit 0dbd9d2a65)
2026-05-20 14:58:41 -07:00
Frank Praznik
b94ffff046 x11: Ignore slave button presses when the window lacks keyboard focus
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)
2026-05-20 13:08:47 -04:00
Frank Praznik
6f9205a3c3 x11: Reject click-through button events based on serial
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)
2026-05-20 13:08:40 -04:00
Sam Lantinga
69300875ec Allow setting NULL palette on any surface
Fixes https://github.com/libsdl-org/SDL/issues/15654

(cherry picked from commit cfed9b3aca)
2026-05-19 14:22:37 -07:00
Ozkan Sezer
6545e5b0b8 SDL_rawinputjoystick.c: fixed a type redefinition error
(cherry picked from commit f19dca3ca0)
2026-05-19 18:55:50 +03:00
Ozkan Sezer
eb8caad5a4 SDL_windows_gaming_input.c: work-around to build against old SDKs.
Fixes https://github.com/libsdl-org/SDL/issues/15646

(cherry picked from commit 42c4a0e30f)
2026-05-19 17:26:28 +03:00
Ozkan Sezer
2f660cb332 hidapi/netbsd: import mainstream commit 7e994d8671:
https://github.com/libusb/hidapi/commit/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)
2026-05-19 17:23:14 +03:00
Kuratius
49aa0c0667 Fix touchpad finger detection on Steam Deck
(cherry picked from commit 6ed1de089c)
2026-05-19 06:54:09 -07:00
Ozkan Sezer
b938acab19 SDL_wasapi.c: added comment about SDL_AudioClientProperties workaround
(cherry picked from commit 48fe7b7d6a)
2026-05-19 11:21:24 +03:00
Frank Praznik
3b73938b5f video: Windows keep any position set when in fullscreen after leaving fullscreen
Adds an automated test for the behavior as well.

(cherry picked from commit f31ca02723)
2026-05-18 09:10:25 -07:00
Susko3
edad1c5563 Properly fix cursor position in Korean IME
(cherry picked from commit b608108593)
2026-05-18 09:02:23 -07:00
7aGiven
89fa8a4c0c fix Korean caret position
(cherry picked from commit 8e6fed2cbf)
2026-05-18 09:02:23 -07:00
Ozkan Sezer
afbbfc6e98 wasapi: workaround that AudioClientProperties->Options not being available in old SDKs
Closes: https://github.com/libsdl-org/SDL/issues/15641.

(cherry picked from commit bf03728873)
2026-05-18 18:56:52 +03:00
7aGiven
7a4cce82eb WM_IME_SETCONTEXT not set 0
(cherry picked from commit 296231e999)
2026-05-18 07:05:26 -07:00
Kuratius
d147bb2a06 Fix Steam Controller 2 touchpad finger detection (#15644)
(cherry picked from commit a20530cf15)
2026-05-18 07:04:16 -07:00
Ozkan Sezer
2e8567bdeb SDL_render_d3d11.c: fix another bad use of SDL_FUNCTION
(cherry picked from commit cbd2917324)
2026-05-17 21:37:00 +03:00
Ozkan Sezer
f689caed82 SDL_render_d3d12.c: revert an unintended change from commit d70578b9aa
(cherry picked from commit f76b736e28)
2026-05-17 20:29:28 +03:00
Frank Praznik
bf7c5e2df2 wayland: Implement Wayland_AcceptDragAndDrop()
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)
2026-05-17 11:52:58 -04:00
Ozkan Sezer
e03ee2f0d9 SDL_opengl_glext.h, src/video/directx/d3d12.h: revert unintended changes from commit d70578b9aa
(cherry picked from commit 75c94e9b31)
2026-05-17 16:30:30 +03:00
Tap
273eeebe71 Correct steam triton haptic commands
The listed report IDs are incorrect - there is no skipped ID

(cherry picked from commit 1f7a42a7b9)
2026-05-17 06:24:22 -07:00
Christian Semmler
581c18f693 emscripten: Fix crash on Safari when probing gamepad rumble support
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)
2026-05-16 15:48:06 -07:00
ceski
f30c0e4ee2 Add Steam Deck capacitive touch sticks, trackpad clicks, and mapping (#15612)
(cherry picked from commit 2ebf23014f)
2026-05-16 09:04:44 -07:00
ceski
cdbc651f65 Add Steam Controller mapping (#15601)
Also fixed Hori QAM button mapping

(cherry picked from commit c00d7b4bf5)
2026-05-15 19:18:56 -07:00
John Schoenick
b8547af466 unix: Fix infinite looping in SDL_FriBidi_Process if len > 127
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)
2026-05-15 15:40:55 -07:00
Rachel Blackman
819bb962fa Add Gamesir Supernova in Xinput mode to controller list
(cherry picked from commit d83e7bf79e)
2026-05-15 13:26:10 -07:00
Evan Hemsley
f3281f6e3d GPU: Set missing fields on Vulkan swapchain texture (#15606)
(cherry picked from commit 86296ac8f0)
2026-05-15 11:44:33 -07:00