Commit Graph

21395 Commits

Author SHA1 Message Date
Ryan C. Gordon
c5bc4576fc video: Default SDL_GL_FRAMEBUFFER_SRGB_CAPABLE back to zero.
(This was corrected in main, but there isn't a clean cherry-pick we can do for
the release-3.4.x branch at this point, since various pieces of the sRGB work
made it in here in a different order, but this is the one crucial line that
appears to be missing.)

Reference Issue #14898.
2026-03-09 16:47:49 -04:00
Nintorch
66020c2ed7 Small GameInput joystick backend improvements
This PR includes small improvements to the GameInput joystick backend:
- Device subtypes
- Compatibility with DirectInput joystick mappings (if the controller is not a gamepad, i.e. `GAMEINPUT_InternalIsGamepad()` returns `false`)
- Fallback to DirectInput/XInput for currently unsupported devices (force feedback ones and the ones that are neither gamepads nor controllers, I'm not sure if that's possible, but maybe racing wheels and other device subtypes would count?)

(cherry picked from commit 0138843eb7)
2026-03-09 11:12:30 -07:00
Mike Egger
c2a910ab02 windows: support flag RIDEV_INPUTSINK in raw input (#15182)
(cherry picked from commit ae3ae4ba44)
2026-03-08 16:12:03 -07:00
Ozkan Sezer
1e4fd21700 stb_image: Fix -Wdouble-promotion warning
Upstream PR 1902 by Björn Wahlstrand at https://github.com/nothings/stb

(cherry picked from commit 31aa18fc1d)
2026-03-09 00:40:14 +03:00
Sanjay Govind
36ed4b75d1 support batteries on 3rd party controllers
(cherry picked from commit e610b85d1c)
2026-03-08 11:40:56 -07:00
Petar Popovic
7280152549 SDL_InternalGlobDirectory(): set string length of base directory to 1, if it's just one slash
(cherry picked from commit 67ac0e5eee)
2026-03-08 11:39:11 -07:00
Petar Popovic
a70353891e SDL_InternalGlobDirectory(): keep track of pathlen and reuse it, instead of calling SDL_strlen(path)
(cherry picked from commit 93e3e8a5fe)
2026-03-08 11:39:11 -07:00
Petar Popovic
fb312b2463 SDL_GlobDirectory(): Don't chop off first slash from path, if it's just multiple slashes
(cherry picked from commit 961a04fa26)
2026-03-08 11:39:11 -07:00
Sanjay Govind
b08f7924a4 Add support for whammy and tilt on PS4/5 guitars
PS4/5 controllers put device specific data into a specific region in the report, so we have to extract it separately.

No known guitars use the right stick on the guitar, so to keep things working similarly to PS3, i have opted to map whammy and tilt the same way as the PS3 rb guitars.

(cherry picked from commit 94f17d6c61)
2026-03-08 11:36:17 -07:00
Ethan Lee
96e05da95e gpu: Fix swapchain texture cycling.
This is actually a 1:1 copy of a patch we wrote for GPU PS5 some time ago!
2026-03-07 10:37:53 -05:00
Ethan Lee
776e87ada9 Revert "render: Added Xbox DXIL for gpu backend".
Turns out Xbox is okay with the PC DXIL, it just isn't as optimal without the root signature annotations.

This reverts commit f2c4c66429.
2026-03-04 15:52:52 -05:00
ImpDi
99a65853a6 Texture2DArray and Compute Pipeline in DirectX12 (#15161)
Apparently, because PlaneSlice wasn't initialized, we couldn't use SDL_GPU_TEXTURETYPE_2D_ARRAY and SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE together, as the error d3d12:
"ID3D12Device::CreateUnorderedAccessView occurred: The PlaneSlice -858993460 is invalid when the resource format is R8G8B8A8_UNORM and the view format is R8G8B8A8_UNORM. Only Plane Slice 0 is valid when creating a view on a non-planar format. [ STATE_CREATION ERROR #344: CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE]"

(cherry picked from commit 89cab56536)
2026-03-03 19:20:09 -08:00
Tobiasz Laskowski
4128c4e44b Fix backspace on android with api 30+
(cherry picked from commit 01bd8b3780)
2026-03-03 17:12:28 -08:00
Frank Praznik
18a0157457 Deprecate SDL_INIT_EVERYTHING from SDL2
Adds SDL_INIT_EVERYTHING to the deprecated symbol list, and renames an internal usage to avoid a warning.

(cherry picked from commit e7199cad0b)
2026-03-03 15:10:43 -05:00
Frank Praznik
b36a5ab6f4 Log failure reasons during early X11 and Wayland initialization
Log the reason for failure during initialization to the debug log to aid in troubleshooting.

(cherry picked from commit 5880b8a283)
2026-03-03 13:33:11 -05:00
Frank Praznik
aa5bcfa3d8 wayland: Don't add keys with the super/GUI modifier to the keymap
SDL normalizes the super/GUI modifier away, so adding a key with this modifier will overwrite the base, unmodified value.

(cherry picked from commit 8c8efd4ccd)
2026-03-02 18:30:40 -05:00
Qiu Qiang
ef03c66ef3 camera: Fix crash when setting frame rate and improve FPS precision
- Use exact numerator/denominator from spec for CMTime to avoid rounding errors.
- Wrap frame rate setting in @try-catch to prevent crashes on strict drivers.

(cherry picked from commit e2a2e2c31e)
2026-03-02 12:00:32 -08:00
DominusExult
6299705584 Use AV capture methods available since iOS 7
(cherry picked from commit 0270da4d1f)
2026-03-02 12:00:29 -08:00
MSRPP-dev
fcce05a19c Update SDL_render_sw.c
Fix the bug in the standard scaling path, SDL_RENDERCMD_COPY should follow the same pattern as SW_RenderCopyEx.

(cherry picked from commit 4dbf5811e9)
2026-03-02 09:49:59 -08:00
Sanjay Govind
1ee158cd31 fix off by one with tilt on ps3 guitars (#15144)
(cherry picked from commit 34378609bb)
2026-03-02 09:45:54 -08:00
Antonio Lattanzio
e4c664a75f oldnames: Add missing deprecated SDL2 symbol mappings (#15137)
(cherry picked from commit 4c52cfb495)
2026-03-02 09:44:52 -08:00
Sam Lantinga
7a1d02083d Added surface validation to SDL_DuplicateSurface()
(cherry picked from commit 73b13728de)
2026-03-02 09:42:01 -08:00
Ethan Lee
0030fafda2 render: Added Xbox DXIL for gpu backend 2026-03-01 23:27:37 -05:00
Ethan Lee
c9479f86f6 testgdk: Update icon filename for the new png image 2026-03-01 23:27:22 -05:00
Petar Popovic
8bf6e23164 Fix potential memory leak in VULKAN_AcquireCommandBuffer() on error
(cherry picked from commit 77f4a8e2b8)
2026-03-01 14:11:19 -08:00
Petar Popovic
fb9bb7426d Fix memory leak when X11 toolkit window locale SDL_strdup() fails
(cherry picked from commit fb1d1ab306)
2026-03-01 11:44:59 -08:00
Sam Lantinga
3a2a13d966 Loading PNG files are part of the core SDL library
Don't disable this functionality when defining SDL_LEAN_AND_MEAN, but if you need to, you can define SDL_DISABLE_STB if you want to compile this out.

Fixes https://github.com/libsdl-org/SDL/issues/15139

(cherry picked from commit 72d5fe213f)
2026-03-01 11:44:01 -08:00
Petar Popovic
48fb914228 Fix potential memory leak in SDL_HIDAPI_HapticOpenFromJoystick() on error
(cherry picked from commit 6cf03ca729)
2026-03-01 11:36:14 -08:00
Sam Lantinga
3e87c31a6c Added surface validation to SDL_ConvertSurfaceRect()
Fixes https://github.com/libsdl-org/SDL/issues/15141

(cherry picked from commit 2d9fca46c6)
2026-03-01 11:35:11 -08:00
Sam Lantinga
654f6f94f6 Fixed SDL_GetIOSize() return value
Fixes https://github.com/libsdl-org/SDL/issues/15129

(cherry picked from commit 0a1c7b5348)
2026-02-28 08:42:21 -08:00
SDL Wiki Bot
e7e2805475 Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit 5212b82c4f)
2026-02-26 07:55:56 +03:00
SDL Wiki Bot
df72790cfb Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit 2e18cf8d09)
2026-02-26 07:55:40 +03:00
Sam Lantinga
0f02c41ac0 Note that SDL_getenv() is case sensitive
Fixes https://github.com/libsdl-org/SDL/issues/15086

(cherry picked from commit 21e10b2e76)
2026-02-26 07:55:20 +03:00
zuiki_inn
6d93ffe923 Add ZUIKI EVOTOP controller support with gyroscope and accelerometer sensor capabilities. (#15034)
(cherry picked from commit 29ca920fdf)
2026-02-25 20:24:50 -08:00
rabbit-ecl
2fad85fa26 Use Uint64 instead for tick_numerators in USE_128BIT_MATH
(cherry picked from commit 230814e85e)
2026-02-25 20:19:30 -08:00
Sam Lantinga
36ba09b63d Fixed definition of builtin function '_m_prefetch'
Fixes https://github.com/libsdl-org/SDL/issues/15116

(cherry picked from commit 5340d6a94c)
2026-02-25 14:30:12 -08:00
Sam Lantinga
b0414440a3 Fixed timer overflow on some platforms
We have an implementation that uses 128-bit math and one that handles large values without it (thanks @jessechounard and @rabbit-ecl!)

Fixes https://github.com/libsdl-org/SDL/issues/15042

(cherry picked from commit 24404d9047)
2026-02-25 11:43:08 -08:00
SDL Wiki Bot
28014a0452 Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit 0246598d62)
2026-02-25 07:40:51 -08:00
SDL Wiki Bot
488e196415 Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit 03fcc037d9)
2026-02-25 07:40:51 -08:00
Ethan Lee
d5b90fd82f render: Reduce scope of D3D12 GDK event watcher to Xbox
(cherry picked from commit a4cd62ef93)
2026-02-25 07:40:51 -08:00
SDL Wiki Bot
c903079708 Sync SDL3 wiki -> header
[ci skip]

(cherry picked from commit bad072e693)
2026-02-25 07:40:51 -08:00
Ethan Lee
b488c2e4a0 gdk: Render/GPU can call SuspendX, document when to call SuspendComplete
(cherry picked from commit 5770e013c2)
2026-02-25 07:40:51 -08:00
Sam Lantinga
aa9de89232 Added battery status for newer FlyDigi controllers
(cherry picked from commit 49a8b4229b)
2026-02-24 20:50:11 -08:00
Sanjay Govind
645b8e7f6d Support accelerometers on 3rd party ps3 controllers (#15109)
(cherry picked from commit 0c859452ef)
2026-02-24 19:00:11 -08:00
Sanjay Govind
17532fd62e Set joystick_type for known ps3/wii instruments (#15111)
(cherry picked from commit a7ccd48957)
2026-02-24 17:30:07 -08:00
Sanjay Govind
2214522b69 deal with controllers that don't have report ids
(cherry picked from commit 1419bcb6cb)
2026-02-24 15:19:49 -08:00
Frank Praznik
c608ce5acb x11: Also send key releases when reconciling state
(cherry picked from commit 2f38b6a396)
2026-02-24 17:13:04 -05:00
Sanjay Govind
b3adee0720 Fix up controller types for various playstation and wii instruments (#15104)
(cherry picked from commit 0e4008441f)
2026-02-24 13:36:08 -08:00
Sam Lantinga
00c85a0b9e Added support for the Flydigi Vader 5 Pro in Xbox 360 mode
(cherry picked from commit 2385dc6297)
2026-02-24 10:20:29 -08:00
Brenton Bostick
77edb4d5d3 fix unknown argument nBufSize
(cherry picked from commit c259f969f2)
2026-02-24 09:50:34 -08:00