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
Sam Lantinga
637a9b34ab
Added a comment explaining the initialization delay
2025-09-03 15:47:21 -07:00
Sam Lantinga
b6a55c2856
Wait a bit for initialization to complete before requesting calibration data
...
Fixes https://github.com/libsdl-org/SDL/issues/13856
2025-09-03 15:36:58 -07:00
Sam Lantinga
9abeeebad5
Fixed warning: no previous prototype for function
2025-09-03 11:23:55 -07:00
Sam Lantinga
437d78499c
Don't set SDL_SURFACE_LOCK_NEEDED until a surface is RLE encoded
...
Reference https://github.com/libsdl-org/sdl2-compat/issues/476
2025-09-02 21:31:51 -07:00
Sam Lantinga
fbbc29159a
Leave letterbox borders set to the frame clear color
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/483
2025-09-02 20:14:34 -07:00
Sam Lantinga
ef19c72015
Set the texture scale and address mode when creating a texture
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/506
2025-09-02 18:05:31 -07:00
Sam Lantinga
84af0bb53a
Updated the 8BitDo Ultimate 2 Wireless Controller dongle update rate
...
The latest dongle firmware appears to update at 1000Hz
2025-09-02 09:53:09 -07:00
Sam Lantinga
a562e40d2c
Revert "Disable rumble for the Ultimate 2 Wireless Controller in dongle mode"
...
This reverts commit 065fdca953 .
8BitDo has fixed the rumble issue with dongle firmware update V1.05
2025-09-02 09:53:09 -07:00
Sam Lantinga
b47572c9bb
Fixed build warning with Visual Studio
2025-09-02 09:53:09 -07:00
Sam Lantinga
1f007ad5cd
Added support for the player LED on Nintendo Switch 2 controllers
2025-09-01 21:11:16 -07:00
Sam Lantinga
4b93e7488f
Added support for the Switch 2 Joy-Cons with charging grip
2025-09-01 21:11:16 -07:00
Sam Lantinga
7c8df4ea52
Fixed warnings building with Visual Studio
2025-08-30 10:15:58 -07:00
Sam Lantinga
3cf2350f21
Fixed build
2025-08-30 10:15:32 -07:00
Sam Lantinga
fa52949529
Added a note that we dynamically load libusb
2025-08-28 09:13:01 -07:00
Sam Lantinga
1a653f7f89
Exported SDL_hid_get_properties()
2025-08-28 09:13:01 -07:00
Sam Lantinga
ac5ccbe386
Moved Nintendo Switch 2 Controller initialization from hid.c to SDL_hidapi_switch2.c
2025-08-28 09:10:47 -07:00
Sam Lantinga
65c1fc1b42
Added SDL_hid_get_properties()
2025-08-28 09:10:47 -07:00
Sam Lantinga
09ca7e8f64
Move libusb support into a shared location
2025-08-28 09:10:47 -07:00
Sam Lantinga
cdae0d10d1
Fixed button mapping for the Nintendo Switch 2 Pro Controller
2025-08-28 09:10:47 -07:00
Sam Lantinga
fb9fcfa37b
Fixed controller name when hotplugging the Nintendo Switch 2 Pro Controller
2025-08-28 09:10:47 -07:00