Commit Graph

21852 Commits

Author SHA1 Message Date
Brenton Bostick
bee45bd114 fix typo
(cherry picked from commit 46a942a3e3)
2026-09-01 11:24:53 -07:00
Ryan C. Gordon
aba2d16233 aaudio: Make input preset into a hint, don't set it by default.
Fixes #16130.
Reference Issue #13402.

(cherry picked from commit 22e42e6e1e)
2026-09-01 14:03:41 -04:00
Ethan Lee
4aa40070ef gpu: Return early when attempting to bind 0 samplers.
This is a common occurrence for vertex shaders specifically, and allows backends
to not have to handle this edge case every time.
2026-09-01 08:26:38 -04:00
Ryan C. Gordon
27d56a5e64 PULL_REQUEST_TEMPLATE.md: "Zlib" should not be capitalized.
(cherry picked from commit fd28dc9d56)
2026-08-31 13:27:58 -04:00
Ryan C. Gordon
197e5d0c23 AGENTS.md: Updated text with latest policy revisions.
Reference Issue #15350.

(cherry picked from commit 83ab835bfd)
2026-08-31 13:27:56 -04:00
Frank Praznik
5b492bd278 x11: Only position the fullscreen window if not on the target display
Entering fullscreen and moving the window can be a racy operation on some desktops, and isn't needed when the window is already on the target display, so only do it when necessary.

(cherry picked from commit 2ec0b24b54)
2026-08-31 13:09:09 -04:00
Frank Praznik
4ef437dc55 cocoa: Convert popup window coordinates to global when adjusting the pointer offset
Fixes a regression in 958c4cbf0d

(cherry picked from commit 013844b003)
2026-08-31 11:59:27 -04:00
Ryan C. Gordon
58ff755ea5 bmp: Correctly load RLE-encoded bitmaps with irregular widths.
(Such as a 4-bpp image--two pixels per byte--with an odd number of pixels.)

Fixes #16210.

(cherry picked from commit c71abd0860)
2026-08-28 21:24:23 -04:00
Frank Praznik
8b2ecd481b events: Add pinch event category
Needed to allow SDL_GetWindowFromEvent() to work with pinch events.

(cherry picked from commit 6b18df27f7)
2026-08-28 11:34:18 -04:00
Sawkez
c589241ba1 PS2: fix textures rendering at half opacity when blend is enabled
(cherry picked from commit 338768e23d)
2026-08-27 15:58:15 -07:00
Sam Lantinga
2ca5446cd4 Fixed reading the factory stick calibration for Nintendo Switch controllers
(cherry picked from commit 8d6c456fb3)
2026-08-27 11:43:42 -07:00
Ryan C. Gordon
c446a31d1c alsa: Manage device index, not just card ID.
Otherwise multiple devices on one card won't open correctly.

Fixes #16205.

(cherry picked from commit af9dbb65f6)
2026-08-27 14:25:16 -04:00
Ryan C. Gordon
2954b9168d cocoa: Run the CFRunLoop for 20ms during SDL_Quit().
This lets the OS remove windows that were destroyed in cases where we aren't
terminating the process right after calling SDL_Quit(). Otherwise, they'll
stay on the screen, unresponsive.

Apparently there is some animation state that needs to complete, and that is
handled via the runloop.

Fixes #10081.

(cherry picked from commit 4f477c807c)
2026-08-27 00:25:31 -04:00
Ryan C. Gordon
2776931725 emscripten: Don't fall back to simulating vsync if settings are still pending.
Fixes #16146.
Closes #16151.

(cherry picked from commit 618890f8fa)
2026-08-27 00:25:29 -04:00
Crispin
6ccd26184a Add more 'see also's to header comments in SDL_gpu.h
(cherry picked from commit 1f922d7c06)
2026-08-26 09:13:38 -07:00
Frank Praznik
0a80aefd49 wayland: Don't perform hit testing during implicit pointer grabs
Skip hit testing when an implicit grab is active, or button raise events may be lost, and the cursor icon may be improperly set if the client reports hit test results while the pointer is outside the window bounds.

(cherry picked from commit bc0a43ec7f)
2026-08-26 12:07:25 -04:00
sxvlsl
7fc7c9b0e8 joystick: Add VKB Gladiator NXT Evo to the flight stick device list
(cherry picked from commit 6a3062fd6c)
2026-08-26 07:44:28 -07:00
Vlad Zahorodnii
4cbc0b06e2 x11: Skip announcing WM_TAKE_FOCUS in WM_PROTOCOLS
By putting the WM_TAKE_FOCUS atom in the WM_PROTOCOLS property, SDL
chooses either the "Locally Active" or "Globally Active" input model
depending on the input flag in WM_HINTS.

In order to assist the window manager with making the right decision,
for example, skip this window when choosing what window to activate
next, it will be better if the WM knows right away that the window
accepts or doesn't accept focus (in other words, have either both
the input flag set in WM_HINTS + WM_TAKE_FOCUS or none).

Since the WM_TAKE_FOCUS atom is placed in the WM_PROTOCOLS property, the
WM wanting to adhere to the spec has no choice but send a client message
asking to activate the window and hope for the better.

At quick glance, it appears that the WM_TAKE_FOCUS atom is leftover from
SDL_WINDOWEVENT_TAKE_FOCUS, which was dropped a while ago, and is not
used anymore. So this change removes the WM_TAKE_FOCUS atom to help
window managers such as kwin work better.

(cherry picked from commit 5e8eb0d4e7)
2026-08-25 12:42:21 -04:00
muzikbike
8bbdd0d409 Add Wake Up key code for Windows
deduced experimentally via experimentation with consumer hardware

(cherry picked from commit 40e1357e29)
2026-08-24 15:37:50 -07:00
Sam Lantinga
8b7cf83909 Added a Windows mapping for the Gamesir-G5
Fixes https://github.com/libsdl-org/SDL/issues/16190

(cherry picked from commit 6648b7966c)
2026-08-24 13:19:30 -07:00
Sam Lantinga
15fff4770a Added detection for Turtle Beach Xbox 360 controllers
(cherry picked from commit 05a0cb5894)
2026-08-24 13:09:52 -07:00
Eri the Switch
98e0329ad9 joystick: Accept partial user calibration for sticks on Switch controllers
This allows user stick calibration to be applied on JoyCons and possibly
partially user calibrated Pro controllers.

(cherry picked from commit fb8a32cc75)
2026-08-24 09:54:37 -07:00
muzikbike
c6570a4de9 Add some missing Microsoft keyboard codes
Deduced experimentally using https://git.stary.pc.pl/Grzesiek11/w32ev

(cherry picked from commit 9712c2c7fc)
2026-08-24 09:51:33 -07:00
quasar32
32f1edb4b9 Hit test no longer executes when destroying wayland window
Signed-off-by: quasar32 <fontejam32@gmail.com>
(cherry picked from commit be51a15ba2)
2026-08-24 10:48:41 -04:00
Sam Lantinga
f107c8f116 GPU: D3D12: set MultisampleEnable for multisampled pipelines (thanks @sailro!)
Closes https://github.com/libsdl-org/SDL/pull/16183

(cherry picked from commit 58702e533f)
2026-08-23 10:52:42 -07:00
Dario Binacchi
143286988d Fix build on PowerPC with uClibc
PPC_FEATURE_HAS_ALTIVEC is not defined by all C libraries. The following
error was raised while testing SDL3 in Buildroot with a PowerPC toolchain
using uClibc-ng:

  src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetAltiVecFeatures':
  src/cpuinfo/SDL_cpuinfo.c:351:37: error: 'PPC_FEATURE_HAS_ALTIVEC' undeclared (first use in this function)
    351 |     altivec = getauxval(AT_HWCAP) & PPC_FEATURE_HAS_ALTIVEC;
        |                                     ^~~~~~~~~~~~~~~~~~~~~~~

Provide a fallback definition when it is not defined.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
(cherry picked from commit e721af3baf)
2026-08-23 10:35:31 -07:00
Sam Lantinga
1277616105 Show the child process wait code instead of turning it into an error string
The exit code of the child process may not fit in 8 bits, it's more useful to provide the full child process status.

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

(cherry picked from commit 8b1e4aa41b)
2026-08-23 10:33:59 -07:00
Dav999-v
d90e52acf2 Fix SDL_PLATFORM_UNI typo in migration guide
SDL_PLATFORM_UNI doesn't actually exist, it seems like it's supposed to
be SDL_PLATFORM_UNIX.

(cherry picked from commit 85260aa180)
2026-08-23 10:10:36 -07:00
Sam Lantinga
33edac8e15 Rebuilt test shader headers
(cherry picked from commit 4601c46a68)
2026-08-23 10:09:35 -07:00
momoko-h
33bf6d6964 Update testgpurender_effects_grayscale.frag.hlsl
The formular did not use blue at all but red twice and the factor intended for blue was off.

(cherry picked from commit 902484f65c)
2026-08-23 10:09:35 -07:00
Sam Lantinga
2024984769 Fixed typo
(cherry picked from commit 38aace9359)
2026-08-22 11:50:12 -07:00
Jaan Soulier
18cf4517cb fix SDL_gpu_vulkan validation warning
(cherry picked from commit a2b27528db)
2026-08-22 08:43:35 -07:00
Sam Clegg
5517f5adb1 [emscripten] Use keyEvent->key instead of deprecated charCode
keyEvent->charCode is deprecated in DOM Level 3 and marked deprecated
in Emscripten's html5.h. Use keyEvent->key instead.

(cherry picked from commit f0b84476f9)
2026-08-22 07:54:17 -07:00
Anonymous Maarten
aa9a2f8813 cmake: add FFmpeg components as argument to find_package
(cherry picked from commit a0db66a718)
2026-08-21 17:59:13 +02:00
Anonymous Maarten
b0bd971b52 ci: vita's lame does not declare mpg123 dependency, so disable testffmpeg
[sdl-ci-filter *vita*]

(cherry picked from commit 80ad29564c)
2026-08-21 03:01:19 +02:00
Anonymous Maarten
6e0fb33e00 ci: vitasdk/vitasdk Docker container switched from Alpine to Ubuntu
See 960c16ac23

[sdl-ci-filter *vita*]

(cherry picked from commit d15e373576)
2026-08-21 03:01:19 +02:00
Ryan C. Gordon
1d4b0337ac wikiheaders: Report full path when dying for a doubly-defined section. 2026-08-20 15:12:00 -04:00
Ryan C. Gordon
9b3b6d5a48 events: Note that SDL_PenProximityEvent::pen_state was added for 3.4.16.
(cherry picked from commit e4c41d393b)
2026-08-18 21:02:51 -04:00
Ryan C. Gordon
82fb81f3d3 pen: Report SDL_PenInputFlags in SDL_PenProximityEvent.
Fixes #16125.

(cherry picked from commit 3bdb7d00d5)
2026-08-18 16:09:35 -04:00
Caleb Cornett
38bb1bddca test: Fix MSAA support in testgpu_spinning_cube
(cherry picked from commit d4440c0446)
2026-08-14 16:46:24 -04:00
Revincx
0d08d3e73e evdev: Fix vertical high-resolution mouse wheel scaling
This commit fixes a regression introduced by c44fa5bb

The evdev backend currently uses high_res_hwheel to select the
normalization denominator for both horizontal and vertical wheel
events.

This causes devices which advertise REL_WHEEL_HI_RES but not
REL_HWHEEL_HI_RES to report vertical wheel movement 120 times
larger than intended.

Use the corresponding high-resolution capability independently for
each axis, restoring the behavior before c44fa5bb.

(cherry picked from commit b640b804a8)
2026-08-10 09:09:00 -07:00
xentripetal
b79a5e27ff metal: Fix inverted return value in METAL_QueryFence
SDL_QueryGPUFence is documented to return true when the fence is signaled (complete). Since 514b26e it returns METAL_INTERNAL_IsFenceBusy directly, so it returns true when the fence is still busy, breaking usage of SDL_AcquireGPUSwapchainTexture.

(cherry picked from commit b340ddcd7b)
2026-08-09 12:00:19 -07:00
Sawkez
46604eb8c0 Haiku: Fix incorrect version macro in SDL_SYS_OpenURL
(cherry picked from commit 700cf42a9d)
2026-08-06 10:35:35 -07:00
Sam Lantinga
66ca28e3be Clarify how the draw blend mode is used in the 2D renderer
Fixes https://github.com/libsdl-org/SDL/issues/16109

(cherry picked from commit 81afb82f2d)
2026-08-06 08:48:31 -07:00
Frank Praznik
15bc6cbdd4 wayland: Use the correct parameter type in the capabilities callback
The capabilities parameter is a uint32_t in the function signature in the header, not an enum.

Fixes a clang-tidy warning.

(cherry picked from commit 2afc369e8a)
2026-08-05 11:05:49 -04:00
Frank Praznik
bd9312a108 wayland: Fix a circular include issue
The event header being included before a header guard was hiding a circular include issue.

(cherry picked from commit b23ae0eec7)
2026-08-05 10:57:56 -04:00
Frank Praznik
759df98b36 wayland: Move include after the guard
(cherry picked from commit 2bf7014836)
2026-08-05 10:39:32 -04:00
capitalistspz
0837c1584c camera: Detect exclusive_caps v4l2loopback devices (#16116)
(cherry picked from commit 355d1ac848)
2026-08-05 07:33:15 -07:00
zuiki_inn
095ac35986 add EVOTOP AXIS controller support (#16117)
(cherry picked from commit f1c274038b)
2026-08-05 07:29:48 -07:00
Caleb Cornett
7ae71a4fab docs: Add section on Xbox GDK suspend/resume handling
(cherry picked from commit 53b485c7aa)
2026-08-04 16:16:10 -07:00