Commit Graph

12630 Commits

Author SHA1 Message Date
Sam Lantinga
07f995eb72 Passing NULL path to SDL_OpenFileStorage() gives access to the whole filesystem 2025-11-15 11:29:37 -08:00
Ryan C. Gordon
3ae7a54c94 filesystem: SDL_OpenFileStorage() now deals with relative paths better.
Fixes #13484.
2025-11-15 11:29:37 -08:00
tsst-tsst
d4bef0d5ba Add support for tcc to cmake (#14464)
This PR adds support to the cmake build scripts so to allow building SDL with the Tiny C Compiler (tcc).

TinyCC supports the subset of C99 used by SDL and will complete the build once the --version-script linker flag is removed. The changes have been tested with various build configurations, including X11 and Wayland, and using tcc version 0.9.28rc 2025-10-27 mob@f4e01bfc on x86_64 Linux.
2025-11-15 11:24:15 -08:00
Frank Praznik
005cb20e67 wayland: Use defines for timer rollover constants
"static const" being treated as constant in C is an extension that is not always supported, so use defines instead.
2025-11-15 11:24:35 -05: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
Susko3
cb6272ed2d windows: Treat absolute mouse as pen events when SDL_HINT_PEN_MOUSE_EVENTS=0.
Some caveats:

- the fake pen will leave proximity only when relative mode is disabled
- unsure if detecting proximity is even possible from raw mouse input

Fixes #12324.
2025-11-14 16:49:49 -05: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
Ryan C. Gordon
d62f141b29 opengl: Fixes for sRGB framebuffer support.
This changes the default for SDL_GL_FRAMEBUFFER_SRGB_CAPABLE to -1 (for
"don't care"). Minor ABI break, but technically this never worked correctly.

Fixes #13055.
2025-11-14 15:40:25 -05: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
Ryan C. Gordon
367c8d7c7b touch: don't compare mouse_touch_events to zero; it's a bool. 2025-11-14 10:28:16 -05: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
Vicki Pfau
9fd3dbfc42 switch2: Remove some unneeded init commands
These commands seem to be queries the console sends, not setup
2025-11-13 20:46:46 -08:00
Vicki Pfau
f0d4aca03d switch2: Bring up IMU support 2025-11-13 20:46:46 -08:00
Vicki Pfau
ae6cdea0fa switch2: Refactor and clean up rumble code a bit 2025-11-13 20:46:46 -08:00
Ryan C. Gordon
d66946cee7 wasapi: fix memory leak on unlikely failure case. 2025-11-13 20:58:21 -05:00
Ryan C. Gordon
7db0e48454 wasapi: Minor style tweaks. 2025-11-13 20:58:21 -05:00
Maia
a01d6f109d Add SDL_LoadSurface and SDL_LoadSurface_IO (#14374) 2025-11-13 14:50:37 -08:00
Sylvain Becker
4cc9153df2 Android: remove old cpu-feature code, and fix build (add HAVE_GETAUXV… (#14460) 2025-11-13 09:12:07 -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
pmx
54f129f765 FIX SDL_GetJoystickSerial() always returning NULL on Linux (UDEV) (#14454) 2025-11-12 14:25:31 -08:00
Ethan Lee
9dbde4542c gpu: Windows 11 guarantees a D3D12 minimum, skip checks accordingly 2025-11-12 16:22:35 -05:00
Ethan Lee
702a1adf4a windows: Add WIN_IsWindows11OrGreater, using a dwBuildNumber helper function 2025-11-12 16:22:35 -05:00
Sam Lantinga
667720d5af Added support for the HORI Taiko Drum Controller For Switch 2025-11-12 12:04:02 -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
Corentin Recanzone
2079517802 Fix Android TitleStorage: avoid leading '/' and handle NULL base path 2025-11-12 14:45:47 -05: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
Ethan Lee
04a62cba1f gpu: Set up D3D12 device checks to avoid unnecessary queries 2025-11-12 11:19:07 -05:00
Chris Burrows
3dab15d3b4 Fix lost KEY_UP events with multiple keyboards using shared scancode state (#14446) 2025-11-11 23:36:08 -08:00
Ethan Lee
b2585ac236 gpu: Vulkan feature/extension lists do not need to be stored in the renderer 2025-11-11 21:24:45 -05:00
Ethan Lee
536507101d gpu: De-duplicate property enumeration for Vulkan features 2025-11-11 20:58:14 -05:00
TheSniperFan
ac0f77b7e6 Allow SDL GPU to opt into additional Vulkan features (#14204) 2025-11-11 15:53:06 -08:00
Anonymous Maarten
6905714986 android: remove dependency on cpu-features.h
android: remove dependency on cpu-features.h

getauxval got introduced into bionic well before Android 5.0
2025-11-11 23:41:43 +00:00
Ryan C. Gordon
25ab8c99df pen: Offer the current window during promixity events on most platforms.
Fixes #12356.
2025-11-11 16:34:22 -05:00
Sam Lantinga
5bed8ec603 Implemented render batching for D3D9 2025-11-11 08:31:37 -08:00
Maia
5ec6147acb Add missing type suffix to SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION prop 2025-11-11 10:37:27 -05: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
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