Replace inet_addr() with InetPtonA() on Windows and inet_pton() on Unix-like systems to fix C4996 warnings on Windows ARM64 builds where warnings are treated as errors.
Moved all DSU joystick driver logic from SDL_dsujoystick_driver.c into SDL_dsujoystick.c, removing the separate driver file. Updated SDL_dsujoystick_c.h to remove internal driver declarations and macros now handled in the implementation. Updated VisualC project file to remove the deleted driver source.
Updated CMakeLists.txt to enable DSU joystick support only on Windows, Linux, Android, Haiku, FreeBSD, NetBSD, OpenBSD, and macOS. Added conditional inclusion of <sys/ioctl.h> in SDL_dsujoystick.c. Removed unused GetDSUMutex helper from SDL_dsujoystick_driver.c.
Updated CMakeLists.txt to only enable DSU joystick on non-Emscripten targets and use sdl_link_dependency for required network libraries. Enhanced DSU socket creation for better non-blocking support and portability, including FIONBIO and ioctl handling. Added missing socket-related includes for non-Windows platforms in SDL_dsujoystick_driver.c.
Disabled DSU joystick on Emscripten due to lack of UDP socket support. Updated socket initialization to use ioctl with FIONBIO for better compatibility on Unix-like systems. Refactored header includes and comments for clarity and platform correctness. Fixed variable naming in DSU data packet handling and removed unnecessary 'static' from inline functions in header.
pa_channel_map_init_auto() with PA_CHANNEL_MAP_WAVEEX does the wrong
thing as it just takes the lest significant bits of
WAVEFORMATEXTENSIBLE's dwChannelMask in order. This doesn't match SDL's
chosen channel ordering.
The implementation here mirrors what we do for PipeWire.
Setting AudioCategory_GameChat breaks audio on several devices, including Behringer U-PHORIA UM2 and RODE NT-USB Mini. We'll disable this for now until we understand more about what's happening.
This means we exercise the non-dlopen()-based code paths for these,
as used in Debian and the Steam Runtime.
Signed-off-by: Simon McVittie <smcv@collabora.com>
libdecor 0.3, which changes the signature of libdecor_new and
libdecor_decorate to use a const pointer to the interface struct, has
not yet been released. In the latest release, libdecor 0.2.4, the
interface struct is a mutable pointer.
This doesn't affect typical upstream builds with
SDL_WAYLAND_LIBDECOR_SHARED=ON, in which case we're casting a pointer
returned by dlsym(); but Linux distributions that want tighter control
over dependencies often prefer to link them in the normal way, in which
case the build will fail if the signature doesn't match.
Fixes: 33834360 "wayland: Fix libdecor incompatible pointer types"
Signed-off-by: Simon McVittie <smcv@collabora.com>