mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add support for SDL3 joystick input driver
Made possible by EIREXE, xsellier and the SDL team. This commit includes statically linked SDL3 for Windows, Linux and macOS. The vendored copy of SDL3 was setup to only build the required subsystems for gamepad/joystick support, with some patches to be able to make it as minimal as possible and reduce the impact on binary size and code size. Co-authored-by: Álex Román Núñez <eirexe123@gmail.com> Co-authored-by: Xavier Sellier <xsellier@gmail.com> Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
parent
987832be46
commit
0b3496fb4f
330 changed files with 154930 additions and 1561 deletions
|
@ -394,6 +394,18 @@ def configure(env: "SConsEnvironment"):
|
|||
else:
|
||||
env["udev"] = False # Linux specific
|
||||
|
||||
if env["sdl"]:
|
||||
if env["builtin_sdl"]:
|
||||
env.Append(CPPDEFINES=["SDL_ENABLED"])
|
||||
elif os.system("pkg-config --exists fontconfig") == 0: # 0 means found
|
||||
env.ParseConfig("pkg-config sdl3 --cflags --libs")
|
||||
env.Append(CPPDEFINES=["SDL_ENABLED"])
|
||||
else:
|
||||
print_warning(
|
||||
"SDL3 development libraries not found, and `builtin_sdl` was explicitly disabled. Disabling SDL input driver support."
|
||||
)
|
||||
env["sdl"] = False
|
||||
|
||||
# Linkflags below this line should typically stay the last ones
|
||||
if not env["builtin_zlib"]:
|
||||
env.ParseConfig("pkg-config zlib --cflags --libs")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue