Commit Graph

22600 Commits

Author SHA1 Message Date
wwsmiff
ff19a49fef Handle cleaning up of commandPool which caused memory leak when resizing 2026-09-16 08:37:55 -07:00
Chicken-Bones
d316e5b2f3 Fix D3D multi-layer texture fallback upload alignment 2026-09-16 10:39:04 -04:00
Sam Lantinga
53761230c9 Fixed build 2026-09-15 17:06:53 -07:00
Sam Lantinga
18d32d5a50 Fixed crash if a broken EZFRD64.DLL is installed
It turns out GameInput crashes the same way as DirectInput
2026-09-15 16:42:32 -07:00
Ryan C. Gordon
a24429c192 harmonyos: Port SDL3 to HarmonyOS/OpenHarmony.
This is my port of SDL3 to HarmonyOS/OpenHarmony. It has been tested on real
hardware from Huawei, and commercial games are being prepped to ship with it
already.

There is _heavy_ documentation in docs/README-harmonyos.md, including how to
set up a development environment and project, build, and debug, for the
completely uninitiated.

This work was sponsored by Outfit7: https://outfit7.com/

Fixes #9837.
2026-09-15 12:33:00 -04:00
Ryan C. Gordon
570f72297b docs: Fix default behavior description for SDL_PROP_APP_METADATA_NAME_STRING.
Fixes #16317.

(cherry picked from commit ddba673cdd)
2026-09-14 16:13:01 -04:00
Evan Hemsley
1a2ba3b94d GPU: Allow multisample textures to be read (#15838) 2026-09-14 12:12:41 -07:00
Frank Praznik
fb8cdf0aa8 dbus: Use the minimum privileges when opening an fd for the OpenURI portal
Open files and directories as read-only, as the fd is only used as proof of access by the portal, and a mismatch between fd write permissions and the portal write parameter will cause the fd to be rejected.
2026-09-14 12:47:33 -04:00
Sam Lantinga
f7cb5a8814 Metal texture format ordering cleanup 2026-09-14 08:56:16 -07:00
Sam Lantinga
33b4a9d915 Added floating point versions of cliprect and viewport render functions
Fixes https://github.com/libsdl-org/SDL/issues/14654
2026-09-13 11:45:06 -07:00
Ryan C. Gordon
b290793b78 stdinc: On Windows, uppercase the system environment table's var names.
Fixes #15086.
2026-09-13 10:47:29 -07:00
Sam Lantinga
5b02b2217c Added SDL_PROP_WINDOW_CREATE_WIN32_STYLE_EX_NUMBER 2026-09-13 10:45:21 -07:00
eleir9268
e23869d99b QNX: ALSA audio support. (#16304) 2026-09-13 09:10:10 -07:00
eleir9268
31cd707935 QNX: Fix EGL surface creation/destruction bugs. (#16310) 2026-09-13 09:08:39 -07:00
Sam Lantinga
dc7ad197c8 Vulkan YUV texture support cleanup 2026-09-13 02:43:52 -07:00
eleir9268
23b9968037 QNX: Use the common EGL code. (#16303) 2026-09-13 01:11:04 -07:00
Sam Lantinga
26b37f5d1c Perform Vulkan YUV color conversion explicitly in shaders
This makes the Vulkan code match the D3D/Metal/GPU renderers, and avoids bugs and unsupported format/sampler combinations on various vendor's drivers (including NVIDIA!)
2026-09-12 12:25:38 -07:00
Sam Lantinga
81880c9d12 testyuv: allow upper case pixel formats on the command line 2026-09-12 12:25:38 -07:00
Sam Lantinga
7a0356155a Use the texture colorspace instead of the buffer parameters on Android
The buffer parameters aren't necessarily correct, due to bugs or missing metadata, so we'll use the texture colorspace as a guide for YUV conversion unless it's specifically set to SDL_COLORSPACE_UNKNOWN.
2026-09-12 12:25:38 -07:00
Frank Praznik
c72fbe7d89 x11: Update all device info on XI_DeviceChanged
XI_DeviceChanged should trigger an update of both relative and scroll info on the device, as anything may have changed. Combine the scroll and relative valuators into one device info struct, and update them together.
2026-09-12 10:51:33 -04:00
Frank Praznik
4d9cd86775 x11: Move the xinput2 device info to the xinput2 source file
It was declared in the mouse header, but is not actually needed there aside from cleanup, which can be moved to the xinput2 quit function.
2026-09-12 10:51:33 -04:00
Sylvain
73cd5b2bbb Android: only register java HIDAPI methods if SDL_HIDAPI is enabled 2026-09-12 07:22:41 +02:00
Brad Smith
5723590ffc fs: Follow up to the initial getexecpath() support
- Add missing CMake piece
- Fix logic to quiet warning
2026-09-12 01:14:22 -04:00
Sam Lantinga
ea3963f01a Try to just recreate the surface and swap chain when being restored on Android
A full device lost + restore takes about 300ms on my Google Pixel Fold running Android 17, where just recreating the swap chain only takes about 8 ms.
2026-09-11 17:05:55 -07:00
Sam Lantinga
0cb26f9f6d Only draw if state was set successfully in the Vulkan renderer
This can fail if there is drawing queued when the device is reset and all textures are freed. This also fixes a crash when that happens.
2026-09-11 17:05:55 -07:00
Sam Lantinga
0aa28e2629 Fixed using the wrong format when using a render target on Vulkan 2026-09-11 17:05:55 -07:00
Sam Lantinga
0628d5c603 Fixed Vulkan validation error when creating a swapchain on Android 2026-09-11 17:05:55 -07:00
Sam Lantinga
5e2f8adce9 Don't try to save and restore EGL context on Vulkan windows on Android 2026-09-11 17:05:55 -07:00
Sam Lantinga
982333a48d Added support for using Android hardware buffers with the Vulkan renderer 2026-09-11 17:05:55 -07:00
Sam Lantinga
4b40cff5d4 Cache the Vulkan YUV conversion pipeline
This is very slow on some mobile devices and is a small win on desktop devices as well.
2026-09-11 17:05:55 -07:00
Ryan C. Gordon
68655e9772 kmsdrm: Instead of demanding ARGB8888, try to find a supported surface format.
Fixes #16136.
2026-09-10 23:47:24 -04:00
Anders Jenbo
015489c672 Probe joystick directly 2026-09-10 22:50:29 -04:00
Anonymous Maarten
321801ac08 check_stdlib_usage: add --no-exclude and check printf 2026-09-10 23:42:14 +02:00
Anonymous Maarten
d61bdd3324 Use SDL_snprintf instead of snprintf 2026-09-10 23:42:14 +02:00
Anonymous Maarten
3a3ebba89c haiku: Don't print screen dimensions when going full screen 2026-09-10 23:42:14 +02:00
Anonymous Maarten
a50e8a6985 Remove debug print utility functions 2026-09-10 23:42:14 +02:00
Anonymous Maarten
667eeb1a7e Use SDL_wcslen in vendored gameinput.cpp 2026-09-10 23:42:14 +02:00
Anonymous Maarten
bfd81a0da4 Replace debug printf's with SDL_Log 2026-09-10 23:42:14 +02:00
Sam Lantinga
04b2fb8046 Make sure the palette is no longer in use before freeing it in the Vulkan renderer
Fixes https://github.com/libsdl-org/SDL/issues/16283
2026-09-10 13:03:31 -07:00
Sam Lantinga
e05eb27f2c Use the surface palette directly for the texture in SDL_CreateTextureFromSurface()
This is a better fix for https://github.com/libsdl-org/SDL/issues/16227. It also allows you to create a whole set of indexed textures from surfaces that share a single palette and then modify that palette to change all textures.
2026-09-10 13:03:31 -07:00
Sam Lantinga
0f5a7cbd2c testyuv: verify the YUV surface locking path
Also implemented YUV surface locking for Vulkan
2026-09-10 13:03:31 -07:00
Sam Lantinga
3df2b1a2a7 Fixed Vulkan validation error in SDL_RenderReadPixels()
Validation Error: [ VUID-VkImageMemoryBarrier-oldLayout-01212 ] | MessageID = 0xff795e16
  vkCmdPipelineBarrier(): pImageMemoryBarriers[0].newLayout (VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL) is not compatible with VkImage 0x2160000000216 usage flags VK_IMAGE_USAGE_2_TRANSFER_DST_BIT_KHR|VK_IMAGE_USAGE_2_COLOR_ATTACHMENT_BIT_KHR.
  The Vulkan spec states: If layouts are not ignored, oldLayout or newLayout is VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then image must have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set (https://docs.vulkan.org/spec/latest/chapters/synchronization.html#VUID-VkImageMemoryBarrier-oldLayout-01212)
2026-09-10 13:03:31 -07:00
Sam Lantinga
15c9ab245f The simple shader is only for HDR10 RGB textures
The use case for this is 2D render target overlays on HDR10 output. In this case we've already done the conversion to the output colorspace and we just want to get the pixels on the screen as fast as possible. Video frames still need YUV conversion, so they shouldn't go through this output path.
2026-09-10 13:03:31 -07:00
Sam Lantinga
21f4bc47b6 Remove SDL_HAVE_YUV checks from render drivers
This doesn't actually save much code size and complicates the drivers a fair bit.

Upside is that you'll now be able to build SDL without software YUV support and still be able to play videos with hardware acceleration enabled.
2026-09-10 13:03:31 -07:00
Brad Smith
b7606be372 fs: Use getexecpath() on OpenBSD for GetExePath(). 2026-09-10 14:13:36 -04:00
x0r
ce85ee87f6 DOS: yield audio thread even when the ring buffer has space 2026-09-10 12:01:35 -04:00
Frank Praznik
b88e540783 x11: Rescan the relative valuators on XI_DeviceChanged
XI_DeviceChanged can have a reason of XISlaveSwitch, which indicates that the valuators need to be updated for the specified device.
2026-09-10 11:53:54 -04:00
Ryan C. Gordon
d66e2d0cbd cocoa: Added SDL_HINT_MAC_USE_GCMOUSE.
Reference Issue #16241.
2026-09-10 09:51:10 -04:00
Sam Lantinga
fe2bca9748 Fixed YUV size and pitch calculations 2026-09-09 14:31:22 -07:00
Frank Praznik
9adf3ff6d3 x11: Don't suppress slave mouse buttons when lacking keyboard focus
The window may not have keyboard focus when using remote control tools, so drop the keyboard focus requirement. Tested not to regress clickthrough suppression.
2026-09-09 13:40:12 -04:00