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
Sam Lantinga
2bb51e1340
Claim the interface before doing bulk transfers
2025-08-28 09:10:47 -07:00
Sam Lantinga
5d9b170a3d
Be explicit that SDL_FLIP_HORIZONTAL_AND_VERTICAL combines horizontal and vertical flipping
...
Closes https://github.com/libsdl-org/SDL/pull/13821
2025-08-28 04:22:31 -07:00
Sam Lantinga
285df94623
Renamed SDL_GPURenderStateDesc to SDL_GPURenderStateCreateInfo for consistency with GPU API conventions
...
Fixes https://github.com/libsdl-org/SDL/issues/12817
2025-08-27 09:14:19 -07:00
Sam Lantinga
da6e9bbf7c
Allow building the tray subsystem without the video subsystem
...
Fixes https://github.com/libsdl-org/SDL/issues/13235
2025-08-27 08:15:24 -07:00
Sam Lantinga
42f634ff7a
Added SDL_AddAtomicU32()
...
Fixes https://github.com/libsdl-org/SDL/issues/13496
2025-08-27 06:44:51 -07:00
Sam Lantinga
5291e9bbbd
Minor cleanup
2025-08-26 19:28:59 -07:00
Sam Lantinga
065fdca953
Disable rumble for the Ultimate 2 Wireless Controller in dongle mode
...
The dongle appears to stop sending input reports with some combination of rumble patterns, easily reproduced with Forza Horizon 5. We'll disable rumble temporarily until @8BitDo can investigate.
2025-08-26 08:39:00 -07:00
Sam Lantinga
66ab91a314
Added SDL_FLIP_HORIZONTAL_AND_VERTICAL
...
Closes https://github.com/libsdl-org/SDL/pull/13788
2025-08-26 05:50:51 -07:00
Sam Lantinga
b13416d74f
Fixed relative motion having desktop mouse scale on Wayland
...
Fixes https://github.com/libsdl-org/SDL/issues/13753
2025-08-25 11:47:56 -07:00
Sam Lantinga
7bbbbb3a1c
Fixed build
2025-08-25 09:45:39 -07:00
Sam Lantinga
aab95894a6
Fixed crash if mouse functions are used after video quit
2025-08-25 08:54:43 -07:00
Sam Lantinga
5f77da3a50
x11: use raw values for relative mouse motion
...
Fixes https://github.com/libsdl-org/SDL/issues/13743
2025-08-14 19:30:54 -07:00
Sam Lantinga
fe16c620d8
Fix crash when enumerating Steam Controllers
...
Closes https://github.com/libsdl-org/SDL/pull/13746
2025-08-14 14:49:04 -07:00
Sam Lantinga
2d855e12d2
Fixed style
2025-08-14 14:48:58 -07:00
Sam Lantinga
20df88a85b
Fixed spacing
2025-08-14 14:44:56 -07:00
Sam Lantinga
e11110400a
Fixed crash when reinitializing video on X11
...
The keyboard keymap was left pointing at a freed keymap after X11_QuitKeyboard()
2025-08-14 13:41:40 -07:00
Sam Lantinga
f934b3e066
x11: fixed creating a window when all displays are disconnected
...
The X server maintains the desktop, but XRandR sends disconnect notifications for all displays. In this case fall back to the generic X11 desktop as a display.
2025-08-13 19:44:13 -07:00
Sam Lantinga
eeae48464e
Fixed crash if X11 initialization fails
2025-08-13 19:44:13 -07:00
Sam Lantinga
4725213eef
Support the "ambient" value for SDL_HINT_AUDIO_CATEGORY
...
Fixes https://github.com/libsdl-org/SDL/issues/13732
2025-08-12 09:54:20 -07:00
Sam Lantinga
40ec9592f1
Restored text missing during wiki sync (thanks @sezero!)
2025-08-09 22:07:14 -07:00
Sam Lantinga
6981522cd6
Revert "Support Google Play 16 KB Page Size Requirement ( #13470 )"
...
This reverts commit dc2c83c383
If you need to support the Google Play 16 kiB page size requirement, the recommendation is to use NDK r28c or newer, which automatically aligns binaries correctly.
2025-08-07 11:44:45 -07:00