Skip to content

sdl: Update to 3.4.10#120373

Open
Nintorch wants to merge 3 commits into
godotengine:masterfrom
Nintorch:update-sdl
Open

sdl: Update to 3.4.10#120373
Nintorch wants to merge 3 commits into
godotengine:masterfrom
Nintorch:update-sdl

Conversation

@Nintorch

@Nintorch Nintorch commented Jun 17, 2026

Copy link
Copy Markdown
Member

What problem(s) does this PR solve?

This PR updates SDL to the current latest stable version (3.4.10).
https://github.com/libsdl-org/SDL/releases/tag/release-3.4.10

The updating process has been done by me and the update script.

This PR has been tested on Windows with the following controllers:

  • A cheap controller from AliExpress
  • DualShock 4
  • Xbox One controller
  • JoyCons
  • DualShock 4 with 8BitDo adapter

It was also confirmed that this PR allows the new Steam Controller to be used properly in Godot:

TODO:

TODO for a separate PR:

Additional information

@Nintorch Nintorch added this to the 4.x milestone Jun 17, 2026
@Nintorch Nintorch requested review from a team June 17, 2026 17:51
@Nintorch Nintorch requested a review from a team as a code owner June 17, 2026 17:51
@Nintorch Nintorch requested a review from a team as a code owner June 17, 2026 17:57
#define SDL_PLATFORM_UNIX 1

#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for the definition of SDL_abort()

Comment thread thirdparty/sdl/SDL.c
@bleuthoot-sven

bleuthoot-sven commented Jun 17, 2026

Copy link
Copy Markdown

Hello, had a quick test with the Steam Controller on Linux.

Seems to work, except for the touchpad move.


Also, it would be nice if the names show up in the input editor. If I searched it correctly, it can be added here

The steam input go as follow, starting at joypad button 20 (at PS4/5 touchpad):

  • 20: Left touchpad press
  • 21: Right touchpad press
  • 22: Left joystick touch
  • 23: Right Joystick touch
  • 24: Left Grip sense touch
  • 25: Right grip sense touch

@Nintorch

Copy link
Copy Markdown
Member Author

Great, thanks for testing!

Comment thread drivers/sdl/SCsub

if env["platform"] == "linuxbsd":
# TODO: Check support for BSD systems.
env_sdl.Append(CPPDEFINES=["SDL_PLATFORM_LINUX"])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Windows defines
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(WINDOWS_ENABLED)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/godotengine/godot/blob/master/thirdparty/sdl/include/SDL3/SDL_platform_defines.h is included after this file is included, so we can't use its defines here

@Snerfoil

Snerfoil commented Jun 18, 2026

Copy link
Copy Markdown

I went and tested with with the Steam Controller (2026). Godot 4.7 still doesn't recognize this yet the official SDL example programs do. (using Input.get_connected_joypads() doesn't list the Steam Controller as a joystick of any kind.)

oh I forgot to mention this was attempted on Linux under wayland.

(edit: just tried the same thing under windows with same results)

@ettiSurreal

ettiSurreal commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

From my testing the Steam Controller (2026) works fine on Windows 11 with this PR out of the box. Tested both over puck, bluetooth and wired, with Steam client open and closed.
Tested on the joypads demo (with buttons expanded to 26), and the motion controls demo attached to that PR.
All extra buttons are recognized, except for 20 and 21 but only when the Steam client is open because then it binds the touchpads to the mouse, but that can be disabled.

One important thing I noticed is that launching the engine through Steam (by adding the editor to the library as a Non-Steam game) surprisingly makes the controller less functional, due to forcing on Steam Input with seemingly no way to disable it for the Steam Controller, which means it'd apply to all Godot games on Steam.
None of the non-standard actions (20-25) are uniquely recognized anymore, and (especially concerningly) it makes it not recognize the gyroscope whatsoever.
I imagine this is something that'll have to be looked into on Valve's end.

@Nintorch

Copy link
Copy Markdown
Member Author

I went and tested with with the Steam Controller (2026). Godot 4.7 still doesn't recognize this yet the official SDL example programs do. (using Input.get_connected_joypads() doesn't list the Steam Controller as a joystick of any kind.)

oh I forgot to mention this was attempted on Linux under wayland.

(edit: just tried the same thing under windows with same results)

Hello, this PR hasn't been merged yet, Godot 4.7 still uses SDL 3.2.28 :)

Thank you for testing, Sneefoil and ettiSurreal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

With the Steam Controller (2026), godot does not receive input when Desktop Configuration is configured as Gamepad

4 participants