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
Sam Lantinga
da84d78796
Fixed unknown frees being reported when SDL is built without allocation counts
2025-09-27 23:47:09 -07:00
Sam Lantinga
1d2a482dde
testgpurender_effects: use the grayscale algorithm from BT.709
2025-09-26 10:27:10 -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
Sam Lantinga
c39d772a07
Added a workaround for fullscreen mouse position on macOS 26
2025-09-25 15:10:08 -07: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
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
Sam Lantinga
fe8c080713
testime: allow enabling/disabling text input on individual windows
2025-09-23 09:59:11 -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
Sam Lantinga
6f3ef22d19
Fixed build warning
2025-09-22 11:27:23 -07:00
Sam Lantinga
cece47c64d
Fixed iOS build
2025-09-22 11:27:07 -07:00
Sam Lantinga
137b0b2bee
The default swap interval on EGL is 1, according to the spec
...
Fixes https://github.com/libsdl-org/SDL/issues/14014
2025-09-22 10:23:08 -07:00
Sam Lantinga
8a67a8a319
testautomation: fixed video tests on iOS
2025-09-22 10:09:30 -07:00
Sam Lantinga
5d9b9673b9
testautomation: use SDL functions for iostream test setup
...
This fixes the IOStream tests on iOS, since the current directory isn't writable
2025-09-22 10:09:30 -07:00
Sam Lantinga
9f9952d53a
Fixed filesystem operations on iOS
...
Full paths are used as-is, relative paths are prepended with a writable path, SDL_GetPrefPath("", ""), since the current directory isn't writable.
2025-09-22 10:09:30 -07:00
Sam Lantinga
7563a3e17d
Fixed clipboard tests on iOS
2025-09-22 10:09:30 -07:00
Sam Lantinga
a662d13f73
Fixed building testautomation on iOS
2025-09-22 10:09:30 -07:00
Sam Lantinga
86203d8312
Document that the joystick and gamepad functions are thread-safe
2025-09-22 08:32:39 -07:00
Sam Lantinga
34b09be6a5
Use clearPrimaryClip() on Android 9 and newer
...
Fixes https://github.com/libsdl-org/SDL/issues/8355
2025-09-21 23:30:20 -07:00
Sam Lantinga
c8f32b67ae
testautomation: use the correct return type for clipboard APIs
2025-09-21 23:27:59 -07:00
Sam Lantinga
a5b070ba2d
Skip render_testLogicalSize() if we didn't get a window of the expected size
...
We rely on that to validate the results of SDL_GetRenderLogicalPresentationRect()
2025-09-21 20:25:10 -07:00
Sam Lantinga
26dd4e3abb
Fixed filesystem operations on Android
...
Full paths are used as-is, relative paths are prepended with SDL_GetAndroidInternalStoragePath(), and operations fall back to the asset system as appropriate.
This is consistent with the behavior of opening files on Android.
2025-09-21 18:23:34 -07:00
Sam Lantinga
005f10bd97
testautomation: fix video tests on Android
...
Like emscripten, window positioning and sizing is not supported on Android.
2025-09-21 16:25:51 -07:00
Sam Lantinga
bae34c3e34
Fixed SDL_RunOnMainThread() on Android
...
If the application is waiting in SDL_WaitEvent(), we still need to run event loop maintenance in between calls to Android_PumpEvents().
Fixes the testautomation events_mainThreadCallbacks() test on Android.
2025-09-21 13:46:11 -07:00
Sam Lantinga
bce2a336d2
Use the default window focus behavior on macOS
...
We had to work around odd behavior in really old versions of macOS, but the current behavior is great.
Fixes https://github.com/libsdl-org/SDL/issues/3954
2025-09-20 18:57:22 -07:00
Sam Lantinga
400489c157
testcontroller: fixed memory leak
2025-09-20 18:21:26 -07:00
Sam Lantinga
6a9ac1cacd
Always poll udev on supported platforms
...
Fixes https://github.com/libsdl-org/SDL/issues/13995
2025-09-20 11:13:39 -07:00
Sam Lantinga
8eeae5f686
The wayland messagebox should only be used under wayland
2025-09-20 09:06:07 -07:00
Sam Lantinga
5503fe1c1b
Fixed a memory leak in fill_device_info_usage() (thanks @digant73)
...
Fixes https://github.com/libsdl-org/SDL/issues/13998
2025-09-20 09:05:37 -07:00
Sam Lantinga
597ef58966
Use zenity messageboxes by default on X11
...
This makes messageboxes consistent between X11 and Wayland.
2025-09-20 08:37:51 -07:00
Sam Lantinga
9e0549d8ff
Use posix_spawn_file_actions_addchdir_np() on macOS
...
posix_spawn_file_actions_addchdir() was introduced in macOS 26, but we want to be able to run on systems all the way back to macOS 15
2025-09-19 08:00:03 -07:00
Sam Lantinga
f8a1ea021b
Fixed crashes when SDL_DISABLE_INVALID_PARAMS is enabled (thanks @AntTheAlchemist!)
2025-09-19 07:43:01 -07:00
Sam Lantinga
0eff3fe558
Fixed double-free when using window surfaces
2025-09-18 20:58:32 -07:00
Sam Lantinga
c25a0b046a
Make SDL_ObjectValid() inline for performance (thanks @mechakotik!)
2025-09-18 20:58:32 -07:00
Sam Lantinga
25b2d2c821
Use new parameter validation macro
2025-09-18 20:58:32 -07:00
Sam Lantinga
ee1c90a358
Improved handling of function parameter validation
...
SDL supports the following use cases:
* Normal operation with fast parameter checks (default):
SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "1");
* Object parameters are checked for use-after-free issues:
SDL_SetHint(SDL_HINT_INVALID_PARAM_CHECKS, "2");
* Enable full validation, plus assert on invalid parameters:
#define SDL_ASSERT_INVALID_PARAMS
* Disable all parameter validation:
#define SDL_DISABLE_INVALID_PARAMS
2025-09-18 20:58:32 -07:00
Sam Lantinga
49e15904ae
Document that SDL_SCALEMODE_PIXELART is available in 3.4.0
...
Fixes https://github.com/libsdl-org/sdlwiki/issues/856
2025-09-18 20:22:15 -07:00
Sam Lantinga
aca9bd02bf
Make sure DEBUG is defined for debug configurations
2025-09-16 09:12:33 -07:00
Sam Lantinga
dac6af4ba6
Only use a transparent cursor on Windows when connected via RDP
...
VMware relies on the cursor being set to NULL to optimize relative mouse motion for games.
We should also revisit whether current RDP works better with a NULL cursor or a transparent cursor.
Fixes https://github.com/libsdl-org/SDL/issues/13700
2025-09-14 17:24:40 -07:00
Sam Lantinga
cc3274b6f1
Remove Windows 32-bit ARM build from CI
...
This architecture is deprecated and is now failing with:
Windows SDK 10.0.22621.0 : 'C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um' not found or was incomplete
Fixes https://github.com/libsdl-org/SDL/issues/13949
2025-09-14 15:45:03 -07:00
Sam Lantinga
30e2fdc5a2
Sort the blacklist entry for the HP Deluxe Webcam KQ246AA
2025-09-14 15:38:47 -07:00
Sam Lantinga
937b7e6aea
Fixed testprocess on 32-bit Windows
...
Previously the test would kill the child process while it was in the process of initializing (loading DLLs, etc) and this would cause the test to fail.
2025-09-14 15:09:07 -07:00
Sam Lantinga
f8bace9b9b
Remove the behavior of warping the mouse on fullscreen transitions
...
This made sense when switching between a window and an exclusive fullscreen video mode of the same dimensions, but it causes user confusion when the window changes size, and doesn't work well with Wayland. I've gotten this feedback from several sources, so we'll just go ahead and remove this behavior for now.
Fixes https://github.com/libsdl-org/SDL/issues/11577
2025-09-14 13:18:30 -07:00
Sam Lantinga
a1d3fc1f50
Clarify why we ignore EINVAL when flushing a file descriptor
2025-09-14 12:11:05 -07:00
Sam Lantinga
e40d337a47
Ignore errors flushing output on POSIX pipes
...
Fixes https://github.com/libsdl-org/SDL/issues/13116
Fixes https://github.com/libsdl-org/SDL/issues/13412
2025-09-14 12:09:16 -07:00
Sam Lantinga
0f2cb0a3f8
Fixed to match window event order
2025-09-14 11:38:09 -07:00
Sam Lantinga
402fa9434d
Updated documentation to reflect that SDL_GetHint() is thread-safe
...
This was fixed at some point, so this updates the documentation to match.
Fixes https://github.com/libsdl-org/SDL/issues/13932
2025-09-14 11:28:45 -07:00
Sam Lantinga
29e6e07396
Note it is safe to do drawing in response to SDL_EVENT_WINDOW_EXPOSED
2025-09-14 10:19:14 -07:00
Sam Lantinga
1aba421bd3
Wait briefly after enabling effects on DualSense controller
...
The rumble motors apparently take a short time to power up after enabling enhanced mode.
Fixes https://github.com/libsdl-org/SDL/issues/13909
2025-09-14 09:59:01 -07:00
Sam Lantinga
f2bdf2a8cc
Removed unnecessary Windows version check
2025-09-14 09:01:42 -07:00
Sam Lantinga
78a29d1670
Disable Windows.Gaming.Input by default
...
The functionality is already covered by XInput and DirectInput, and Microsoft is recommending GameInput going forward.
Fixes https://github.com/libsdl-org/SDL/issues/13000
2025-09-14 08:47:52 -07:00
Sam Lantinga
ede86a1267
Fixed memory leak when using detached threads
...
Fixes https://github.com/libsdl-org/SDL/issues/13886
2025-09-14 08:42:25 -07:00
Sam Lantinga
113c7e8a58
Fixed delayed text entry for OTP codes on iOS (thanks @pipiwoaini!)
...
Fixes https://github.com/libsdl-org/SDL/issues/13717
2025-09-14 08:08:13 -07:00
Sam Lantinga
c78e279d3c
Removed unneeded preprocessor guards
2025-09-13 07:22:30 -07:00
Sam Lantinga
3c627390bb
Updated deployment target to VisionOS 1.3
2025-09-12 10:28:44 -07:00
Sam Lantinga
e7784b7bf7
Set GPU properties for maximum hardware compatibility
...
Resolves https://github.com/libsdl-org/SDL/issues/13928
2025-09-11 21:30:58 -07:00
Sam Lantinga
00812d13b0
The names of keyboards and mice are valid after they've been removed
...
Fixes https://github.com/libsdl-org/SDL/issues/12816
2025-09-11 20:07:55 -07:00
Sam Lantinga
3ddc3f1146
Send events for mice and keyboards detected during initialization
...
Fixes https://github.com/libsdl-org/SDL/issues/12815
2025-09-11 20:07:55 -07:00
Sam Lantinga
712ce16469
Fixed emulated touch on Android
...
This also fixes laser pointer input on Meta Quest headsets
2025-09-10 14:44:26 -07:00
Sam Lantinga
035eed351c
Added SDL_GetPixelFormatFromGPUTextureFormat() and SDL_GetGPUTextureFormatFromPixelFormat()
...
Fixes https://github.com/libsdl-org/SDL/issues/13899
2025-09-10 12:08:04 -07:00
Sam Lantinga
b7dba970e1
Fixed setting SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER
2025-09-09 17:34:34 -07:00
Sam Lantinga
a4b180f515
Added SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER
2025-09-09 17:34:34 -07:00
Sam Lantinga
0f8d062e10
Fixed warning: conversion to 'uint32_t' from 'float' may alter its value
2025-09-08 19:25:41 -07:00
Sam Lantinga
df0cc6e98b
Make sure we always zero the buffer sent to Steam Controllers
...
This fixes bad initialization for Steam Controllers with the original firmware
2025-09-08 18:41:17 -07:00
Sam Lantinga
3f196c0abe
Added a name for the Windows raw input thread
2025-09-08 11:39:17 -07:00
Sam Lantinga
9d6fb509fe
cliprect example: allow the clipping rectangle to extend outside the destination
2025-09-07 19:48:05 -07:00
Sam Lantinga
bb557f1077
Fixed jitter when doing a scaled blit to a surface with clipping set
...
Fixes https://github.com/libsdl-org/SDL/issues/10953
Fixes https://github.com/libsdl-org/SDL/issues/12658
2025-09-07 19:48:05 -07:00
Sam Lantinga
174d411b50
Fixed ERROR: IDXGIFactory::CreateSwapChain: The flag DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING is only allowed for FLIP swapchains
2025-09-07 16:54:03 -07:00
Sam Lantinga
35959b606a
Added support for the DEBUG_INVOCATION environment variable
...
Fixes https://github.com/libsdl-org/SDL/issues/12275
2025-09-07 14:32:47 -07:00
Sam Lantinga
9116a56c13
Fixed memory leak enumerating display modes on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/13233
2025-09-07 13:53:51 -07:00
Sam Lantinga
834b5ba7fb
Note that letterboxing uses the clear color now, not black bars
2025-09-07 13:02:39 -07:00
Sam Lantinga
ab17d66884
Make sure the surface used for a software renderer is a valid format
...
Fixes https://github.com/libsdl-org/SDL/issues/13323
2025-09-07 12:55:33 -07:00
Sam Lantinga
9ccdaa49f4
Removed reference to icon-alpha.bmp
...
This file was never added, and I believe this just had a 50% alpha channel added to the standard icon.bmp
Fixes https://github.com/libsdl-org/SDL/issues/13394
2025-09-07 12:54:14 -07:00
Sam Lantinga
cd6b68a9fb
Define the behavior of a negative width or height passed to SDL_RenderFillRect()
...
The software renderer now matches the 3D renderer behavior by rendering a reversed rectangle (extending width or height in the opposite direction) when width or height is negative. It also now renders no rectangle if the width and height are 0.
Fixes https://github.com/libsdl-org/SDL/issues/13400
2025-09-07 12:28:37 -07:00
Sam Lantinga
ec33da05b3
Added SDL_HINT_RENDER_DIRECT3D11_WARP
...
Fixes https://github.com/libsdl-org/SDL/issues/13002
2025-09-07 11:00:59 -07:00
Sam Lantinga
466f93aee1
Fixed pitch and chroma issues with the Vulkan planar YUV texture update functions
...
Fixes https://github.com/libsdl-org/SDL/issues/13734
2025-09-07 10:19:00 -07:00
Sam Lantinga
2304047c95
testyuv: enable testing planar YUV texture update functions
2025-09-07 10:19:00 -07:00
Sam Lantinga
25d9096d41
Fixed rumble strength on DualSense Edge and Bluetooth connected controllers
...
Fixes https://github.com/libsdl-org/SDL/issues/13771
2025-09-06 11:53:32 -07:00
Sam Lantinga
fb2daa2f5f
Updated the documentation for SDL_GetRenderLogicalPresentation()
...
Fixes https://github.com/libsdl-org/SDL/issues/13791
2025-09-06 11:21:36 -07:00
Sam Lantinga
d03f3e11f6
Change the default YUV colorspace to SDL_COLORSPACE_BT601_LIMITED
...
This was the default for SDL2 and what people expect, migrating code.
Fixes https://github.com/libsdl-org/SDL/issues/13796
2025-09-06 11:04:25 -07:00
Sam Lantinga
02fc571cfd
Fixed build
2025-09-06 10:12:01 -07:00
Sam Lantinga
5605f85d84
Check the return value of SDL_SW_CopyYUVToRGB()
2025-09-06 10:07:09 -07:00
Sam Lantinga
d21da8644b
Revert "Make sure fast path RGB <-> YUV conversions are using the same color primaries"
...
This reverts commit ee87132385 .
The supported conversions assume correct primaries for YUV converted to SRGB
2025-09-06 10:03:41 -07:00
Sam Lantinga
61e41c61dc
Select the shader based on the inputs, not colorspace
...
Fixes https://github.com/libsdl-org/SDL/issues/13880
2025-09-06 08:58:17 -07:00
Sam Lantinga
c573326f11
Fixed double-free in the OpenVR video backend
2025-09-05 14:47:20 -07:00
Sam Lantinga
3572be3998
Improved detection of FlyDigi controllers
2025-09-04 18:21:17 -07:00
Sam Lantinga
a9b5a1e785
Simplified the transparent software renderer test
2025-09-04 10:31:22 -07:00
Sam Lantinga
f48c20f481
Added testsoftwaretransparent to the CMake build system
2025-09-04 09:25:05 -07:00
Sam Lantinga
9e3d5969e6
Fixed testsoftwaretransparent on platforms using a renderer for window surfaces
2025-09-04 09:24:22 -07:00
Sam Lantinga
ea1a769322
Fixed the perspective matrix calculation (thanks @KonkolyTamas!)
...
Fixes https://github.com/libsdl-org/SDL/issues/13867
2025-09-04 06:04:01 -07:00