Commit Graph
12265 Commits
Author SHA1 Message Date
eafton 76308181b9 Fix #14072 2025-09-30 08:41:23 -07:00
Wohlstand e3d65796f4 SDL_render_psp.c: Implemented working viewport support
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Backported from the SDL2 branch
2025-09-29 19:09:26 -07:00
Sam Lantinga 15f1cb4c98 Added GPU API support on visionOS
You must set SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN to false on this platform, since setDepthClipMode is not supported on Apple headsets (as of visionOS 2.3) and clipping is the default.
2025-09-29 13:28:00 -07:00
Sam Lantinga 2809ce9389 Set enable_depth_clip to true by default if SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN is false 2025-09-29 13:28:00 -07:00
Sam Lantinga f61e271e11 Generalize and validate optional GPU feature properties
Fixes https://github.com/libsdl-org/SDL/issues/13139
Fixes https://github.com/libsdl-org/SDL/issues/13138
2025-09-29 12:42:47 -07:00
Sam Lantinga 595f7b7ed9 Revert "Fixed Vulkan validation error"
This reverts commit b82b1f416f.

The renderer should not be enabling depth clamping.
2025-09-29 06:08:27 -07:00
Ozkan Sezer 5fffa8b9ad SDL_video_unsupported.c: fix SDL_iOSAnimationCallback type redefinition error
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-29 08:41:14 +03:00
Sam Lantinga b65590159b Each application palette corresponds to one hardware palette
When the application modifies the palette, any textures that use it will automatically be updated.
2025-09-28 22:10:06 -07:00
Sam Lantinga 5d311635cf Added Vulkan support for palettized textures 2025-09-28 22:10:06 -07:00
Sam Lantinga e2fe23ddab Added hardware accelerated support for palettized textures
Supported backends: direct3d, direct3d11, direct3d12, gpu, metal, opengl, opengles2
2025-09-28 22:10:06 -07:00
Sam Lantinga b82b1f416f Fixed Vulkan validation error
VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782(ERROR / SPEC): msgNum: -316906200 - Validation Error: [ VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782 ] | MessageID = 0xed1c6528 | vkCreateGraphicsPipelines(): pCreateInfos[0].pRasterizationState->depthClampEnable is VK_TRUE, but the depthClamp feature was not enabled. The Vulkan spec states: If the depthClamp feature is not enabled, depthClampEnable must be VK_FALSE (https://vulkan.lunarg.com/doc/view/1.3.268.0/windows/1.3-extensions/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782)
2025-09-28 22:10:06 -07:00
Sam Lantinga 524ba0a4ad Reduce the size of the D3D12 vertex shader constants
This is needed to add more fragment shader constants in the future as we're already at our 64 size limit
2025-09-28 22:10:06 -07:00
Sam Lantinga 5622eef5a8 Fixed memory leak if requested renderer isn't available 2025-09-28 22:10:06 -07:00
Sam Lantinga 2a01e12d34 Simplify palette code
Each texture gets its own palette, the palette is updated when it is rendered if necessary, rendering is flushed if a texture render is already queued up.

Trying to share palettes and handle the different cases of queued rendering and changing palettes in the middle of the frame ends up being very complicated, so we'll keep it simple for now.
2025-09-28 22:10:06 -07:00
Sam Lantinga 7dcc09986d Test changing the palette for a single texture 2025-09-28 22:10:06 -07:00
Sam Lantinga 264b436dba Fixed changing palettes while rendering is in flight 2025-09-28 22:10:06 -07:00
Sam Lantinga 0b4b254a53 Added support for textures with palettes
Closes https://github.com/libsdl-org/SDL/pull/6192
2025-09-28 22:10:06 -07:00
mccakit d42bf59c66 wasm64 lto fix
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-28 19:33:48 -04:00
Victor Ilyushchenko a34d31322c Fix Metal 3D texture upload stride calculation
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
2025-09-28 07:32:17 -07:00
Sam Lantinga da84d78796 Fixed unknown frees being reported when SDL is built without allocation counts
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-27 23:47:09 -07:00
Ryan C. Gordon 2676f23910 audio: fix crash in SDL_GetAudioStreamOutputChannelMap.
Fixes #14058.
2025-09-27 13:31:29 -04:00
ProgramGamer 2c8c2d72b5 Allow in-memory IOStreams to be of length 0 (#13840)
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-27 09:36:30 -07:00
mccakit 26f961ab05 wasm64 fix 2025-09-27 11:41:31 -04:00
Frank Praznik 191f46dd36 wayland: Rename some callbacks to be closer to their canonical Wayland names
The old names made it difficult for people searching or otherwise trying to understand the codebase, as they were somewhat mangled from their expected names (e.g. configure_toplevel_xdg vs xdg_toplevel_configure, the latter of which would be expected by someone reading the spec).
2025-09-27 10:59:52 -04:00
Anonymous Maarten 9f721e8a9c Add test that verifies all SDL3 symbols are available
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-26 21:42:04 +02:00
Anonymous Maarten 4718000dba Add JNI_OnLoad to dynamic API 2025-09-26 21:42:04 +02:00
Anonymous Maarten cdc4609993 Add headers for unsupported sources 2025-09-26 21:42:04 +02:00
Anonymous Maarten f9f172cf60 gamepad: use SDL_PLATFORM_ANDROID macro instead of ANDROID 2025-09-26 21:39:06 +02:00
Ryan C. Gordon e528d5bd9f wasapi: Don't proxy device disconnect to the WASAPI management thread.
It gets proxied to the main thread, now.

Fixes deadlocks when unplugging a playing USB audio device.
2025-09-26 14:11:08 -04:00
eafton cd9919dc51 X11TK: Implement high contrast, dark themes and fix up some more positioning code (#14055) 2025-09-26 10:30:28 -07:00
Sam Lantinga 1f73c19a73 Added stub SDL_TimeToDateTime() for N-Gage
Fixes https://github.com/libsdl-org/SDL/issues/14047
2025-09-26 09:37:04 -07:00
Brad Smith b299e0de46 Use elf_aux_info() on OpenBSD
NFC for ARMv7. For PowerPC move elf_aux_info() to higher priority over
sysctl for newer systems.
2025-09-26 08:27:40 -07:00
Sam Lantinga c39d772a07 Added a workaround for fullscreen mouse position on macOS 26
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-09-25 15:10:08 -07:00
Ryan C. Gordon 65e462a6f2 audio: Handle device disconnects on the main thread.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This avoids situations like:

- PulseAudio holds its own lock in the hotplug thread.
- The hotplug thread notices a device went away.
- The hotplug thread calls SDL_AudioDeviceDisconnected().
- SDL_AudioDeviceDisconnected() tries to grab the device lock.
- The device thread is holding the device lock...
- ...but is currently waiting on PulseAudio's lock to release.

In short: deadlock. It's better to queue this work to run on the main thread,
where we can guarantee a start with _none_ of the audio subsystem locks held.
2025-09-25 16:02:19 -04:00
Sam Lantinga b2188b325d Fixed HIDAPI controller disconnect reading on multiple threads
If multiple threads are calling SDL_UpdateJoysticks(), then an overlapped read can be initiated on one thread (read_pending set to true) and GetOverlappedResult() called on another thread. This results in ERROR_OPERATION_ABORTED. This is harmless so we shouldn't return an error in this case, we'll just retry the read on the next call.

Fixes https://github.com/libsdl-org/SDL/issues/14033
2025-09-25 10:36:14 -07:00
Sam Lantinga 33a74c7548 Fixed typo 2025-09-25 07:31:07 -07:00
Vicki Pfau ed2cdceb66 switch2: Read user calibration data 2025-09-24 18:15:07 -07:00
eafton f3a9f66292 Add more Unicode tests to testmessage, improve fallback fonts in X11TK (#14042) 2025-09-24 14:23:27 -07:00
eafton 0b9a197eda X11TK: Remove text positioning hacks, use proper ascent values. (#14040) 2025-09-24 11:26:12 -07:00
Frank Praznik 9d5d7010de wayland: Ignore bogus libdecor content sizes if an unmapped window is suspended
If a client takes a long time to present the first frame after creating the window, a configure event to set the suspended state may arrive with libdecor increasing the content size by the decoration dimensions, which should be ignored.
2025-09-24 10:34:42 -04:00
Frank Praznik 45480f5fe5 x11: Use the pending size for the min/max limits if a resize is in flight
Otherwise, an outdated size may be used, reverting the requested resize operation.
2025-09-24 10:34:42 -04:00
Sam Lantinga 0a50058f7a Use the real window position on macOS
On newer MacBooks, the fullscreen window might be placed below the camera notch, so use the actual window position

Fixes https://github.com/libsdl-org/SDL/issues/10441
2025-09-23 22:57:21 -07:00
Simon McVittie c13e74be6b progress: Correct calls to dbus_message_iter_open_container with variants
As documented, the contained_signature is to be passed in as a
nul-terminated C string.

For basic types that are represented by a single character, on
little-endian platforms, putting the type in the least significant
byte of an int and casting its address to `char *` happens to result in
a valid string, because the int's in-memory representation looks like
`(char []){ 'b', 0, 0, 0 }`. However, on big-endian platforms, the int's
in-memory representation is `(char []){ 0, 0, 0, 'b' }` which is not
a valid type for a D-Bus variant to hold (it is interpreted as an empty
string, and variants are not allowed to be empty).

Instead, do this the straightforward way, with a mnemonic string and
no casts (in the same style used in `SDL_portaldialog`).

Fixes: 3f2226a9 "Add progress bar support for Linux"
Resolves: https://github.com/libsdl-org/SDL/issues/13953
Bug-Debian: https://bugs.debian.org/1115705
Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-09-23 08:19:25 -07:00
Sam Lantinga 221d1f12ea Use an empty bitmap for the blank cursor on macOS
Some macOS installations seem to have trouble decoding the GIF we were using

Fixes https://github.com/libsdl-org/SDL/issues/14012
2025-09-22 19:14:38 -07:00
Frank Praznik 18195c5ef0 x11: Add #ifdef guards to the XInput2 quit function
Fixes building if XInput2 isn't available.
2025-09-22 17:48:12 -04:00
Frank Praznik 733335e272 x11: Apply remapping to XInput2 mouse button events from slave devices
Slave pointer devices report raw button values, while the master pointer device reports button values with remapping applied. Manually apply the remapping table to slave device buttons to eliminate multiple button events from one press, and allow button remapping to function when relative mode is active.
2025-09-22 17:33:31 -04:00
eafton 4363582e6d X11TK: Fix build 2025-09-22 14:31:13 -07:00
eafton 7cc477d458 X11TK: Even more failsafes for fonts 2025-09-22 14:31:13 -07:00
eafton 773db8eb75 X11TK: Even more failsafes for fonts 2025-09-22 14:31:13 -07:00
eafton 8cbd5d5b25 X11TK: Use SDL_roundf instead of normal roundf 2025-09-22 14:31:13 -07:00