Merge pull request #108373 from Nintorch/fix-sowrap-enabled

Fix the usage of udev and dbus with SDL joystick input driver
This commit is contained in:
Thaddeus Crews
2025-08-03 10:51:17 -05:00
13 changed files with 171 additions and 1406 deletions

View File

@@ -145,6 +145,7 @@ if env["builtin_sdl"]:
"thread/pthread/SDL_systls.c",
"timer/unix/SDL_systimer.c",
]
env_sdl.Prepend(CPPPATH=[thirdparty_dir + "core/linux"])
elif env["platform"] == "macos":
env_sdl.Append(CPPDEFINES=["SDL_PLATFORM_MACOS"])

View File

@@ -92,16 +92,18 @@
#define HAVE_UNSETENV 1
#endif
// TODO: handle dynamic loading with SOWRAP_ENABLED
// (even though DBus can also be loaded with SOWRAP_ENABLED, we load it
// statically regardless of SOWRAP_ENABLED, because otherwise SDL won't compile)
#ifdef DBUS_ENABLED
#define HAVE_DBUS_DBUS_H 1
#define SDL_USE_LIBDBUS 1
// SOWRAP_ENABLED is handled in thirdparty/sdl/core/linux/SDL_dbus.c
#endif
#if defined(UDEV_ENABLED) && !defined(SOWRAP_ENABLED)
#ifdef UDEV_ENABLED
#define HAVE_LIBUDEV_H 1
#define SDL_USE_LIBUDEV
#ifdef SOWRAP_ENABLED
#define SDL_UDEV_DYNAMIC "libudev.so.1"
#endif
#endif
#define SDL_LOADSO_DLOPEN 1