Sam Lantinga
cc768f3e88
Allow opening asset paths starting with "./"
...
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
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
...
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
...
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
2025-11-11 08:31:37 -08:00
Sam Lantinga
6b07e13fef
Fixed spacing
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
...
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
...
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
...
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
Sam Lantinga
9a19cc8323
Fixed unaligned load in Xbox HIDAPI driver
2025-11-07 10:37:58 -08:00
Sam Lantinga
118dcf27ce
Added D mode mappings for the 8BitDo 64 Bluetooth Controller
...
The HID descriptor maps the C buttons as a right thumbstick, but this mapping matches the HIDAPI Nintendo 64 mapping.
The start button resets the controller in both USB and Bluetooth mode on macOS, but I've kept the mapping assuming this is a macOS bug that will be fixed.
2025-11-07 10:18:49 -08:00
Sam Lantinga
9ff737efbd
Updated the Nintendo Switch N64 controller mapping
...
This mapping matches the Linux kernel default mapping.
2025-11-07 10:18:49 -08:00
Sam Lantinga
f211a3bb69
Fixed initial rumble on the 8BitDo 64 Bluetooth Controller
2025-11-07 10:18:49 -08:00
Sam Lantinga
a2ed1a4197
Fixed blitting bitmaps with a non-zero x offset
...
Also added basic testautomation coverage of bitmap blits
Fixes https://github.com/libsdl-org/sdl2-compat/issues/546
2025-11-06 22:47:50 -08:00
Sam Lantinga
2a873be9cd
Return false from SDL_SetWindowMouseRect() if it's not supported
2025-11-06 11:59:47 -08:00
Sam Lantinga
599bd1a6aa
Fixed building if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO isn't defined
2025-11-06 11:30:59 -08:00
Sam Lantinga
e24eeefbd1
The default render texture format is SDL_PIXELFORMAT_ARGB8888
...
We do this for consistency across backends
2025-11-06 09:46:43 -08:00
Sam Lantinga
ca072c9fc6
Don't do anything if the window mouse rect hasn't changed
2025-11-06 09:18:58 -08:00
Sam Lantinga
c94da8977d
Validate SPI read command in the Nintendo Switch HIDAPI driver
2025-11-05 17:34:22 -08:00
Sam Lantinga
9a1745f2c8
Fixed unaligned access in the Nintendo Switch HIDAPI driver
2025-11-05 17:08:22 -08:00
Sam Lantinga
49134ecf25
Pass the error through from the SetRelativeMouseMode() implementation
2025-11-03 13:07:17 -08:00
Sam Lantinga
05887f2087
Return false from SDL_SetWindowRelativeMouseMode() if relative mode isn't available
...
Fixes https://github.com/libsdl-org/SDL/issues/14388
2025-11-03 13:01:41 -08:00
Sam Lantinga
eedc0b19fd
Fixed build warning when X11 XInput isn't available
2025-11-03 13:01:41 -08:00
Sam Lantinga
4560fae07e
Fail configuration if X11 dependency packages aren't available
...
It happens fairly often that people enable X11 support but don't install the extension libraries that SDL depends on. This makes those required if not explicitly disabled, which should help prevent accidentally broken builds.
2025-11-03 13:01:41 -08:00
Sam Lantinga
a6351ac474
Added libxtst-dev to Linux CI build dependencies
2025-11-03 13:01:41 -08:00
Sam Lantinga
ea8e66ccd1
Don't use getpagesize() on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/14328
2025-11-03 08:36:29 -08:00
Sam Lantinga
6493be9eea
Removed SDL_AUTO_ENABLE_ENHANCED_FLYDIGI
2025-11-03 08:20:41 -08:00
Sam Lantinga
97e2951875
Removed redundant wait at shutdown in the ALSA audio driver
2025-11-02 18:30:12 -08:00
Sam Lantinga
4db63e323e
Save a copy of the D3D12 semantic string
...
Fixes https://github.com/libsdl-org/SDL/issues/14383
2025-11-02 16:16:20 -08:00
Sam Lantinga
0882623092
Clamp the audio drain delay to 100 ms
...
Fixes https://github.com/libsdl-org/SDL/issues/9829
2025-11-02 11:15:25 -08:00
Sam Lantinga
889e4787d6
Clarify when we want to auto-enable Apex 5 enhanced functionality
2025-11-02 11:14:41 -08:00
Sam Lantinga
3336aa95f1
Fixed the paddle mapping for Steam Controllers
...
Fixes https://github.com/libsdl-org/SDL/issues/14380
2025-11-02 10:06:49 -08:00
Sam Lantinga
b695e5c24b
Fixed whitespace
2025-11-02 09:31:55 -08:00
Sam Lantinga
eb87a36940
Fixed the right touchpad calculation for the BLE Steam Controller
...
Fixes https://github.com/libsdl-org/SDL/issues/14368
2025-11-02 08:31:37 -08:00
Sam Lantinga
6c4f2bd83d
Use DefWindowProc for the initial SDL window proc
...
This makes sure that anything that hooks window creation to set up window proc hooks will call DefWindowProc instead of infinitely recursing when we set up our window proc afterwards.
Fixes https://github.com/libsdl-org/SDL/issues/10529
2025-11-02 07:23:29 -08:00
Sam Lantinga
a82e8a701d
Allow dynamically switching mode of the Apex 5 controller
...
The controller can be in XInput mode or enhanced mode, so it will always show up as an XInput controller, and the enhanced mode controller will come and go as enhanced mode is enabled or disabled in the FlyDigi Space Station app.
2025-11-01 14:49:31 -07:00
Sam Lantinga
28849fd789
Manually enable acquiring the Apex 5 controller if necessary
...
The FlyDigi Space Station app isn't available on non-Windows platforms, so we need to manually enable acquiring the controller on those platforms.
2025-11-01 14:49:31 -07:00
Sam Lantinga
524739900a
Fixed potential double-free when creating a renderer (thanks @Sackzement!)
...
Closes https://github.com/libsdl-org/SDL/pull/14371
2025-11-01 11:24:14 -07:00
Sam Lantinga
aafbf7183f
Copy shader params instead of caching a pointer to them
...
It's possible for a new texture to be allocated with the same address as a previous one, so we can't just cache the pointer value.
Fixes https://github.com/libsdl-org/SDL/issues/14369
2025-11-01 11:24:14 -07:00
Sam Lantinga
de5d8616bf
Updated SDL tests XCode project
2025-10-31 10:34:42 -07:00
Sam Lantinga
d97e8bd49b
Removed SDL_uikitwindow
...
This was only needed as a workaround for buggy behavior in iOS 8
2025-10-31 10:34:42 -07:00
Sam Lantinga
b46e26e65a
Added support for the UIScene life cycle on Apple platforms
...
Fixes https://github.com/libsdl-org/SDL/issues/12680
2025-10-31 10:34:42 -07:00
Sam Lantinga
b6f67dd2b2
tests: add a template Info.plist that uses the whole screen
...
The OS uses the presence of the UILaunchScreen key to determine whether to display the application in compatibility mode or display using the whole screen.
2025-10-31 10:34:42 -07:00
Sam Lantinga
09f00e397c
testsymbols: include SDL_main.h
2025-10-31 10:34:42 -07:00
Sam Lantinga
446fb65ca6
Mark the Apex 5 controller as being acquired by SDL
2025-10-30 22:35:06 -07:00
Sam Lantinga
1502c2fd8b
Added support for the Flydigi Apex 5 controller ( #14218 )
2025-10-30 21:20:44 -07:00
Sam Lantinga
2f5279eb01
Clarify SDL_ConvertEventToRenderCoordinates() documentation
...
Fixes https://github.com/libsdl-org/SDL/issues/14360
2025-10-30 09:00:14 -07:00
Sam Lantinga
c21b7f8cb8
Check to see if joysticks are actually initialized in SDL_UpdateJoysticks()
...
Fixes https://github.com/libsdl-org/SDL/issues/14362
2025-10-30 08:53:57 -07:00
Sam Lantinga
a7147f327f
Temporarily disable WASAPI device roles
...
Setting AudioCategory_GameChat breaks audio on several devices, including Behringer U-PHORIA UM2 and RODE NT-USB Mini. We'll disable this for now until we understand more about what's happening.
2025-10-30 07:27:23 -07:00