Sam Lantinga
f92435cdb9
Vulkan windows get the Vulkan GPU backend in the gpu renderer by default
2025-12-02 07:29:33 -08:00
Sam Lantinga
e1edeab0c9
Added touch subsystem locking
...
Fixes https://github.com/libsdl-org/SDL/issues/14563
2025-12-02 01:11:38 -08:00
Sam Lantinga
22decf4783
Fixed some clang thread-safety warnings
2025-12-02 01:11:38 -08:00
Sam Lantinga
ea1514ab63
testthread: verify that child threads aren't SDL_IsMainThread()
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-30 12:15:48 -08:00
Sam Lantinga
955698c635
testthread: SDL performs thread initialization automatically
2025-11-30 12:15:48 -08:00
Sam Lantinga
1c46c8a3dc
Set SDL_MAIN_AVAILABLE for all platforms
2025-11-30 12:15:48 -08:00
Sam Lantinga
778f70c906
Clarify which thread is the main thread
...
If video is initialized, the main thread is the one that initialized video, otherwise if events are initialized, the main thread is the thread that initialized events, otherwise the main thread is the one that called the main function.
Fixes https://github.com/libsdl-org/SDL/issues/14511
2025-11-30 12:15:48 -08:00
Sam Lantinga
5e9163592f
Correct the sensor axis ordering with the Linux Nintendo driver
...
Fixes https://github.com/libsdl-org/SDL/issues/14552
2025-11-30 11:35:36 -08:00
Sam Lantinga
b9d794bb37
Fixed pen mouse motion when SDL_HINT_PEN_MOUSE_EVENTS is off (thanks @frenzibyte!)
...
Fixes https://github.com/libsdl-org/SDL/issues/14554
2025-11-30 10:55:47 -08:00
Sam Lantinga
fdcd548612
Added SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER
...
This lets applications choose which scene their windows are being created in. For example one window might be video output in a scene with a session role of UIWindowSceneSessionRoleExternalDisplayNonInteractive, and video controls in a scene with a session role of UIWindowSceneSessionRoleApplication.
2025-11-26 12:37:58 -08:00
Sam Lantinga
54b15532d3
Set window controller interaction on all windows
...
We should update all windows, not just the ones in the active scene
2025-11-26 11:50:54 -08:00
Sam Lantinga
52a4366e54
x11: don't grab the pointer while buttons are pressed
...
Grabbing the mouse interrupts touch events in progress, so if someone
enables relative mode while a button is pressed, wait for the button to
be released before grabbing the mouse.
2025-11-25 14:34:58 -08:00
Sam Lantinga
7e5f3330ff
Added libxi and libxfixes to the Arch Linux package recommendations
2025-11-25 14:34:58 -08:00
Sam Lantinga
74653b3cd5
Send the normal sensor data for the right Joy-Con controller in combined mode
2025-11-25 10:38:42 -08:00
Sam Lantinga
24fe3c48a0
Fixed events for windows that have had their window proc hooked at creation time
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-24 19:29:13 -08:00
Sam Lantinga
55a566a6b4
Steam expects the gyro data to come before the accelerometer data
2025-11-24 18:04:46 -08:00
Sam Lantinga
9896dc18e7
Fixed setting SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER for the initial display
2025-11-24 13:38:21 -08:00
Sam Lantinga
8fa93d64ab
Reset the window icon when returning from fullscreen mode
...
Fixes https://github.com/libsdl-org/SDL/issues/14522
2025-11-24 13:28:36 -08:00
Sam Lantinga
56269cd010
Support PNG icons in the SDL test code
2025-11-24 13:16:16 -08:00
Sam Lantinga
6534345d9a
Only process events for the window being created at creation time
...
Fixes https://github.com/libsdl-org/SDL/issues/14524
2025-11-24 12:47:31 -08:00
Sam Lantinga
ebd3aa5289
testgpu_spinning_cube: fixed error handling if texture creation fails
2025-11-24 08:31:38 -08:00
Sam Lantinga
ba919832e4
testgpu_spinning_cube: removed duplicate calls to clear and present
2025-11-24 08:24:43 -08:00
Sam Lantinga
c0a2ae2a4a
opengles2: fixed swapped colors when using indexed textures
2025-11-23 11:38:35 -08:00
Sam Lantinga
f0d958d850
Validate parameters to SDL_ReadStorageFile() and SDL_WriteStorageFile()
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-22 18:41:30 -08:00
Sam Lantinga
1fc093491a
vulkan gpu: set the sample count for depth prepass
...
Fixes https://github.com/libsdl-org/SDL/issues/14500
2025-11-22 07:53:16 -08:00
Sam Lantinga
67728a5450
Allow resizing test applications on iPadOS
2025-11-21 09:31:10 -08:00
Sam Lantinga
082848e945
Use consistent values for the video mode refresh rate
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/SDL/issues/14468
2025-11-20 17:07:47 -08:00
Sam Lantinga
92eaa34277
cocoa: release any mouse buttons not pressed when gaining focus
...
Fixes https://github.com/libsdl-org/SDL/issues/13134
2025-11-20 13:51:23 -08:00
Sam Lantinga
168e4eb532
Fixed typo (thanks @Clownacy!)
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-20 09:47:28 -08:00
Sam Lantinga
a9a24ac000
Fixed the KingKong2 PRO Controller failing to initialize over Bluetooth
2025-11-20 09:24:07 -08:00
Sam Lantinga
61bf7087f5
Fixed build warnings with Visual Studio
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-19 17:02:33 -08:00
Sam Lantinga
9f444b3981
Fixed initializing EVORETRO GameCube adapters
...
The HID device needs to be closed while enabling input reports over USB
2025-11-19 16:11:18 -08:00
Sam Lantinga
d50cda3247
Added mappings for PlayStation VR2 Sense Controllers
2025-11-19 11:48:09 -08:00
Sam Lantinga
fa3467a94d
Use the product category if the vendorName isn't available
2025-11-19 11:39:20 -08:00
Sam Lantinga
ef0ae4c903
Revert "fix: use productCategory instead of vendorName for joy name for apple driver"
...
This reverts commit 964bedfdd9 .
The vendorName is more expressive and lets the user distinguish between different controllers of the same type, e.g. "PlayStation VR2 Sense Controller (R)" and "PlayStation VR2 Sense Controller (L)" vs "Spatial Controller"
If the product category is necessary, we can add a property to store that as additional information on the controller.
2025-11-19 11:35:38 -08:00
Sam Lantinga
6d60cc65cf
Note that SDL_PLATFORM_IOS is defined for visionOS
2025-11-19 11:28:28 -08:00
Sam Lantinga
0c5655940c
SDL_GetPlatform() returns "visionOS" on visionOS
2025-11-19 11:27:27 -08:00
Sam Lantinga
1209abf9dc
Fixed macOS build
2025-11-19 10:47:31 -08:00
Sam Lantinga
a1ade13f1e
Enable gamepad events on visionOS
...
Normally the gamepad is used for navigation on visionOS, but when the controller subsystem is enabled we want to receive gamepad input as gamepad events instead.
2025-11-19 10:37:33 -08:00
Sam Lantinga
1e5cbbc1d0
checkkeys: clarify that SDL_HINT_WINDOWS_RAW_KEYBOARD isn't needed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-19 08:54:43 -08:00
Sam Lantinga
cc768f3e88
Allow opening asset paths starting with "./"
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/SDL/issues/13933
2025-11-18 15:29:04 -08:00
Sam Lantinga
908216bbae
Set the requested window size on visionOS
2025-11-18 11:06:10 -08:00
Sam Lantinga
47360a9a46
The pixel density on Apple Vision Pro is 2.0
2025-11-18 11:05:55 -08:00
Sam Lantinga
44471b3ea4
Fixed build for iOS and tvOS
2025-11-17 16:55:31 -08:00
Sam Lantinga
4931c675ab
Fixed warning C4127 (conditional expression is constant) in Visual Studio
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-17 16:06:58 -08:00
Sam Lantinga
b144c79da2
Added support for resizing windows on visionOS
2025-11-17 16:03:23 -08:00
Sam Lantinga
c68254927f
Fixed the SI GameCube dual stage trigger button mapping
...
Also moved the second touchpad button to the end of the misc buttons
2025-11-17 09:28:06 -08:00
Sam Lantinga
770b38b4f1
Loosened epsilon for color matching
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixed https://github.com/libsdl-org/SDL/issues/14473
2025-11-15 16:51:19 -08:00
Sam Lantinga
4bc9ab665d
Use a base path of "./" on Android
...
This allows filesystem operations to use internal storage and the asset system by default.
2025-11-15 11:29:37 -08:00
Sam Lantinga
07f995eb72
Passing NULL path to SDL_OpenFileStorage() gives access to the whole filesystem
2025-11-15 11:29:37 -08:00
Sam Lantinga
c6935f9dcb
Fixed EGL framebuffer colors on AMD drivers
2025-11-15 08:05:34 -08:00
Sam Lantinga
a4c269cd10
Fixed handling framebuffer_srgb_capable for EGL and iOS
2025-11-15 08:05:34 -08:00
Sam Lantinga
dccf486a0a
Fixed potential infinite recursion opening a Steam Controller
...
This can happen if the controller is opened from an event watcher when the controller is connected.
2025-11-14 13:44:02 -08:00
Sam Lantinga
0ae3d7b0b0
Fixed crash in the vulkan renderer when the window is minimized
...
There's more work to do here in other cases where we can't recreate the swap chain, but this fixes the common minimize case.
Fixes https://github.com/libsdl-org/SDL/issues/14434
2025-11-14 12:35:33 -08:00
Sam Lantinga
ed6d41f55b
testcontroller: demonstrate multiple sensors on the virtual controller
2025-11-14 08:18:04 -08:00
Sam Lantinga
cc3b5766fa
testsprite: changed return type of LoadSprite() to bool
2025-11-14 08:05:49 -08:00
Sam Lantinga
919254cdd1
Fixed comment for the new Steam Controller mapping
...
Fixes https://github.com/libsdl-org/SDL/issues/14465
2025-11-14 07:09:36 -08:00
Sam Lantinga
e2e8f86076
Check for wine_get_version() to detect Wine/Proton
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
If this application is being run under Wine but Steam doesn't know that, Steam won't set STEAM_COMPAT_PROTON. So we'll use wine_get_version() to detect that we're running under Wine instead.
2025-11-12 22:29:42 -08:00
Sam Lantinga
493bc621e4
Don't check SteamVirtualGamepadInfo when running as Wine
...
Wine will ignore the Steam Virtual Gamepad if it looks like it has the original (blocked) controller VID/PID.
Fixes https://github.com/libsdl-org/SDL/issues/14410
2025-11-12 22:29:42 -08:00
Sam Lantinga
dafca86123
Cleanup SDL_UDEV_GetProductSerial()
2025-11-12 22:23:27 -08:00
Sam Lantinga
667720d5af
Added support for the HORI Taiko Drum Controller For Switch
2025-11-12 12:04:02 -08:00
Sam Lantinga
d0926d380e
Added SDL_hidapi_steam_triton.c to the GDK Visual Studio project
2025-11-12 11:54:48 -08:00
Sam Lantinga
379c47cc75
Revert "Fix lost KEY_UP events with multiple keyboards using shared scancode state ( #14446 )"
...
This reverts commit 3dab15d3b4 .
With this commit any repeated key will be reported as held down indefinitely.
2025-11-12 11:51:34 -08:00
Sam Lantinga
0c5f7f6a33
unix: Unref SDL_gtk context on quit
2025-11-12 11:42:02 -08:00
Sam Lantinga
e1af623631
Fixed Steam Deck sensor timings
2025-11-12 11:36:37 -08:00
Sam Lantinga
1998b65045
Added support for the new Steam Controller
2025-11-12 11:32:32 -08:00
Sam Lantinga
65989d269e
Updated SDL_GPUVulkanOptions documentation
2025-11-11 20:49:14 -08:00
Sam Lantinga
5bed8ec603
Implemented render batching for D3D9
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-11 08:31:37 -08:00
Sam Lantinga
6b07e13fef
Fixed spacing
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-11-10 18:30:59 -08:00
Sam Lantinga
fffaf122df
Added temporary workaround for failing Emscripten test
2025-11-10 18:30:02 -08:00
Sam Lantinga
dde7fa3b17
Validate the output colorspace before setting up a renderer
2025-11-10 18:30:02 -08:00
Sam Lantinga
6baaa0fe87
Destroy the window surface if a software renderer couldn't be created
2025-11-10 18:30:02 -08:00
Sam Lantinga
6a7fb838f4
Return false if we couldn't update the emscripten framebuffer
2025-11-10 18:30:02 -08:00
Sam Lantinga
eccd5c03c3
testautomation: added tests to cover linear <-> sRGB colorspace conversion
2025-11-10 18:30:02 -08:00
Sam Lantinga
33c70af2f8
Fixed SDL_COLORSPACE_SRGB_LINEAR being used for RGBA32 textures
2025-11-10 18:30:02 -08:00
Sam Lantinga
1c77304ee9
Fixed getting an 8-bit window surface on Apple platforms
...
The Metal renderer doesn't support XRGB texture formats, so we ended up matching SDL_PIXELFORMAT_INDEX8 for the window surface.
2025-11-10 18:30:02 -08:00
Sam Lantinga
ff890d1733
Fixed crash blitting to an 8-bit surface with no palette
2025-11-10 18:30:02 -08:00
Sam Lantinga
6389f4db4c
SDL_FindColor() can be static
2025-11-10 18:30:02 -08:00
Sam Lantinga
ead02b08dd
Skip tonemapping for render targets with unspecified HDR headroom
2025-11-10 18:30:02 -08:00
Sam Lantinga
4e5ba722fd
Change the batch if the color scale changes
...
The color scale is a shader constant so it can be applied in linear space
2025-11-10 18:30:02 -08:00
Sam Lantinga
d29f368ca8
Change the batch if the GPU render state changes
2025-11-10 18:30:02 -08:00
Sam Lantinga
3399bc600e
gpu renderer: add color to the point/line vertex data
...
This allows us to batch color changes in a single draw call
2025-11-10 18:30:02 -08:00
Sam Lantinga
97ebfbf7a0
Only convert color to linear once in VULKAN_QueueDrawPoints()
2025-11-10 18:30:02 -08:00
Sam Lantinga
d9be8b9a00
Implemented render batching for D3D11, D3D12, Metal, and Vulkan
...
Fixes https://github.com/libsdl-org/SDL/issues/7534
2025-11-10 18:30:02 -08:00
Sam Lantinga
a96664674f
Fixed windows events on 32-bit Windows
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
When running on 32-bit Windows, DefWindowProc resolves to a function in ntdll.dll, but after the window is created the actual window proc is a function in user32.dll. We solve this by using our own custom default window proc and looking for that instead.
Fixes https://github.com/libsdl-org/SDL/issues/1442
2025-11-09 07:44:45 -08:00
Sam Lantinga
704ac98d3f
Make sure the blit mapping is cleared when undoing RLE encoding
...
This fixes a crash if a surface is RLE encoded, then locked and unlocked.
We also mark the surface as no longer needing to be locked after undoing RLE encoding
2025-11-08 15:38:47 -08:00
Sam Lantinga
089dc86bcf
Lazily redo RLE encoding
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Also stop lying about the RLE encoding state, which causes crashes if we do RLE blit operations while the surface is locked.
2025-11-08 14:51:27 -08:00
Sam Lantinga
cc2a272d6f
Enable RLE more often in the software renderer
...
We don't need to aggressively disable RLE acceleration anymore because the original pixels remain available for operations that aren't supported by the RLE blitter.
2025-11-08 14:51:27 -08:00
Sam Lantinga
ac0edbe9d2
Just assert that RLE encoding isn't active
...
We undo RLE encoding in the calling code, so we shouldn't need to do anything here.
2025-11-08 14:51:27 -08:00
Sam Lantinga
2b365983db
Save the original pixels when RLE encoding is enabled
...
Trying to reconstruct the original image when undoing RLE encoding was never completely accurate.
Fixes https://github.com/libsdl-org/SDL/issues/14424
2025-11-08 12:56:25 -08:00
Sam Lantinga
78152d13ee
Added SDL_ConvertSurfaceRect() for internal use
2025-11-08 12:56:25 -08:00
Sam Lantinga
d145e78cd6
Improved performance scaling 8-bit surfaces
2025-11-08 12:56:25 -08:00
Sam Lantinga
01d359c1df
Don't create a larger surface than we need when scaling
2025-11-08 12:56:25 -08:00
Sam Lantinga
7d628ef76c
Fixed scaling YUV surfaces
2025-11-08 12:56:25 -08:00
Sam Lantinga
7553d5892e
Fixed software renderer 8-bit scaling and rotation (thanks @jroatch!)
...
Fixes https://github.com/libsdl-org/SDL/issues/14422
2025-11-08 08:46:58 -08:00
Sam Lantinga
1fb663b429
Make sure that SDL_PIXELFORMAT_ARGB8888 is the first texture format for OpenGL
...
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/SDL/issues/1440
2025-11-07 11:13:50 -08:00
Sam Lantinga
3489a45216
Use srcpixel now that we've set it
2025-11-07 11:12:10 -08:00
Sam Lantinga
294beceec7
Fixed error: 'srcpixel' may be used uninitialized
2025-11-07 11:11:31 -08:00
Sam Lantinga
0f21e46586
Added support for SDL_PIXELFORMAT_INDEX8 to SDL_BlitTriangle_Slow()
...
Fixes https://github.com/libsdl-org/SDL/issues/14419
2025-11-07 11:01:23 -08:00
Sam Lantinga
547b2a2e37
SDL_SetSurfaceRLE() has a boolean parameter
2025-11-07 11:01:23 -08:00