Commit Graph

20704 Commits

Author SHA1 Message Date
Sam Lantinga
524739900a Fixed potential double-free when creating a renderer (thanks @Sackzement!)
Closes https://github.com/libsdl-org/SDL/pull/14371
2025-11-01 11:24:14 -07:00
Sam Lantinga
aafbf7183f Copy shader params instead of caching a pointer to them
It's possible for a new texture to be allocated with the same address as a previous one, so we can't just cache the pointer value.

Fixes https://github.com/libsdl-org/SDL/issues/14369
2025-11-01 11:24:14 -07:00
Frank Praznik
3a59163614 wayland: Optimize custom cursor image lookup
Store the images in order from smallest to largest to simplify lookup and be able to early-out of the search loop even if there is no exact match for the scale.
2025-10-31 16:15:12 -04:00
Frank Praznik
6a510d6174 wayland: Set tablet cursors separately from pointer cursors
Some compositors don't implicitly use the pointer cursor when the tablet cursor is not set, and the presence of a tablet doesn't necessarily guarantee pointer capability. Set the cursor for tablet tools independently of pointer cursors.

This required refactoring of cursor state handling, as well as some tablet related structures.
2025-10-31 16:15:12 -04:00
Frank Praznik
ca569bb837 wayland: Use viewports to scale custom cursors
Cache the cursor image data at creation time, and use a viewport to render scaled custom cursors, instead of generating new cursor images for every scale.
2025-10-31 16:15:12 -04:00
Sam Lantinga
de5d8616bf Updated SDL tests XCode project 2025-10-31 10:34:42 -07:00
Sam Lantinga
d97e8bd49b Removed SDL_uikitwindow
This was only needed as a workaround for buggy behavior in iOS 8
2025-10-31 10:34:42 -07:00
Sam Lantinga
b46e26e65a Added support for the UIScene life cycle on Apple platforms
Fixes https://github.com/libsdl-org/SDL/issues/12680
2025-10-31 10:34:42 -07:00
Sam Lantinga
b6f67dd2b2 tests: add a template Info.plist that uses the whole screen
The OS uses the presence of the UILaunchScreen key to determine whether to display the application in compatibility mode or display using the whole screen.
2025-10-31 10:34:42 -07:00
Sam Lantinga
09f00e397c testsymbols: include SDL_main.h 2025-10-31 10:34:42 -07:00
Sam Lantinga
446fb65ca6 Mark the Apex 5 controller as being acquired by SDL 2025-10-30 22:35:06 -07:00
techflashYT
b3dd0995df cmake: don't auto vectorize with AltiVec on PPC
Allowing GCC/Clang to auto-vectorize with AltiVec support breaks support
for non-AltiVec compatible processors.  Adding this option allows the
existing AltiVec specific code to function as it always did, but
prevents the compiler from inserting AltiVec instructions into arbitrary
codepaths that SDL can't gate off via the existing CPUInfo code.
2025-10-30 21:56:52 -07:00
Sam Lantinga
1502c2fd8b Added support for the Flydigi Apex 5 controller (#14218) 2025-10-30 21:20:44 -07:00
Arkadiusz Hiler
0d2f081d41 pulseaudio: Match channel map to SDL's chosen order
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.
2025-10-30 13:32:43 -07:00
SDL Wiki Bot
45a1cfde1f Sync SDL3 wiki -> header
[ci skip]
2025-10-30 16:01:56 +00:00
Sam Lantinga
2f5279eb01 Clarify SDL_ConvertEventToRenderCoordinates() documentation
Fixes https://github.com/libsdl-org/SDL/issues/14360
2025-10-30 09:00:14 -07:00
Sam Lantinga
c21b7f8cb8 Check to see if joysticks are actually initialized in SDL_UpdateJoysticks()
Fixes https://github.com/libsdl-org/SDL/issues/14362
2025-10-30 08:53:57 -07:00
Sam Lantinga
a7147f327f Temporarily disable WASAPI device roles
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.
2025-10-30 07:27:23 -07:00
Simon McVittie
0773e88df5 CI: Make some important libraries mandatory on Steam Linux Runtime 3.0
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>
2025-10-30 07:13:37 -07:00
Simon McVittie
8b64dd67d2 wayland: Fix compile with libdecor 0.2 and SDL_WAYLAND_LIBDECOR_SHARED=OFF
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>
2025-10-30 07:13:37 -07:00
Sam Lantinga
d9ca0457b5 Make sure we don't allocate a TLS ID clobbering an application defined one
Fixes https://github.com/libsdl-org/SDL/issues/14359
2025-10-29 14:05:49 -07:00
Kirill Andriiashin
a76fb7b2fb Add support for GPU RGB565 (B5G6R5_UNORM) textures with DX11 (#14358) 2025-10-29 10:39:58 -07:00
Quentin Thébault
3b80fcd1a0 KMSDRM/EVDEV: add VT switching support for FreeBSD (#14346)
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
2025-10-29 09:52:32 -07:00
Sam Lantinga
b3612f6462 testautomation: fixed RLE operation test on big endian systems
Fixes https://github.com/libsdl-org/SDL/issues/14348
2025-10-29 16:26:31 +00:00
Sam Lantinga
8b8c51573b Disabled incorrect 16-bit Altivec blitters 2025-10-29 16:11:25 +00:00
Sam Lantinga
84fac6ca44 testautomation: verify that RLE operation output is correct 2025-10-29 09:07:56 -07:00
Sam Lantinga
bf0752a8d7 Fixed converting RLE encoded surfaces to other formats 2025-10-29 09:06:25 -07:00
Sam Lantinga
c4cef905ae Updated internal documentation 2025-10-29 08:39:56 -07:00
Sam Lantinga
cecf4b0d4e Fixed the right shoulder button on the 8BitDo Pro 3 2025-10-28 14:55:06 -07:00
Sam Lantinga
78f9cb44c3 Added a Linux mapping for the 8BitDo Pro 3 2025-10-28 14:13:40 -07:00
Frank Praznik
3383436068 wayland: Fix libdecor incompatible pointer types 2025-10-28 12:01:41 -04:00
Sam Lantinga
2d14a237dc Fixed trying to grab the mouse when losing keyboard focus
Fixes https://github.com/libsdl-org/SDL/issues/14350
2025-10-28 07:15:43 -07:00
SDL Wiki Bot
a57757aaba Sync SDL3 wiki -> header
[ci skip]
2025-10-28 07:10:36 +00:00
Sam Lantinga
933beeb18b Fixed warning: no previous extern declaration for non-static variable 2025-10-27 17:52:05 -07:00
Sam Lantinga
965ac7f406 Fixed warning: implicit conversion loses integer precision: 'long' to 'int' 2025-10-27 17:49:49 -07:00
Sam Lantinga
90242312fe Restored the original OpenBSD Xbox 360 controller mapping 2025-10-27 17:39:29 -07:00
Sam Lantinga
b305534edc Completed removing predefined Xbox 360 mappings for Linux
Also removed them for OpenBSD, since it's not clear which ones, if any, are needed.
2025-10-27 17:34:23 -07:00
Sam Lantinga
be1d44279c Fixed error: incompatible function pointer types passing
SDL/src/sensor/emscripten/SDL_emscriptensensor.c:80:5: error: incompatible function pointer types passing
      'int (*)(int, const EmscriptenDeviceMotionEvent *, void *)' (aka 'int (*)(int, const struct EmscriptenDeviceMotionEvent *, void *)') to parameter of type 'em_devicemotion_callback_func' (aka
      'bool (*)(int, const struct EmscriptenDeviceMotionEvent *, void *)') [-Wincompatible-function-pointer-types]
   80 |     emscripten_set_devicemotion_callback((void *)0, false, &SDL_EMSCRIPTEN_SensorCallback);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-10-27 10:13:57 -07:00
Dave Wickham
f6c3af9c8c Re-add deleted gamepad mappings to the OpenBSD-specific section 2025-10-27 08:55:03 -07:00
Dave Wickham
0c4c4cfd16 Remove special-case Xbox 360 wireless controller mappings
Fixes https://github.com/libsdl-org/SDL/issues/14324
2025-10-27 08:55:03 -07:00
Eddy Jansson
f773da2273 log: Rework NGAGE logging. (#14321)
This moves the NGAGE file logging into SDL_LogOutput(), following the pattern of the 3DS, VITA, PSP, etc.
2025-10-27 08:48:04 -07:00
SDL Wiki Bot
8ca8887885 Sync SDL3 wiki -> header
[ci skip]
2025-10-27 15:39:21 +00:00
Sam Lantinga
f5966890b0 Added a note that SDL_LoadPNG() is designed for trusted images
Fixes https://github.com/libsdl-org/SDL/issues/14338
2025-10-27 08:38:00 -07:00
Sam Lantinga
01aa1882f8 Added a patch note for SDL_ELF_NOTE_DLOPEN
Fixes https://github.com/libsdl-org/SDL/issues/14337
2025-10-27 08:28:05 -07:00
Anonymous Maarten
5ad12c47dc cmake: make sure VARIABLE of check_linker_supports_version_file ends up in cache 2025-10-27 03:01:57 +01:00
Anonymous Maarten
766532948e cmake: SDL_process on unix needs vfork symbol
Current FIL-C toolchains don't have vfork
2025-10-26 23:22:37 +01:00
SDL Wiki Bot
4e8f93c6f1 Sync SDL3 wiki -> header
[ci skip]
2025-10-26 16:28:36 +00:00
expikr
b4eaf9d96f Add hint for blocking win key when using raw keyboard (#13066)
Co-authored-by: Susko3 <Susko3@protonmail.com>
2025-10-26 09:27:33 -07:00
Sam Lantinga
0ea20a5f86 Fix NULL pointer dereference in SDL_RenderGeometryRaw with NPOT textures (thanks @bleeqer!)
Fixes https://github.com/libsdl-org/SDL/issues/14329
Closes https://github.com/libsdl-org/SDL/pull/14331
2025-10-26 08:10:52 -07:00
antonegas
33f1008d01 Added Emscripten support for Sensor API 2025-10-26 07:58:28 -07:00