Commit Graph

13755 Commits

Author SHA1 Message Date
Ryan C. Gordon
618890f8fa emscripten: Don't fall back to simulating vsync if settings are still pending.
Fixes #16146.
Closes #16151.
2026-08-27 00:19:56 -04:00
Frank Praznik
bc0a43ec7f 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.
2026-08-26 12:05:15 -04:00
sxvlsl
6a3062fd6c joystick: Add VKB Gladiator NXT Evo to the flight stick device list 2026-08-26 07:44:01 -07:00
Vlad Zahorodnii
5e8eb0d4e7 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.
2026-08-25 12:41:30 -04:00
Sam Lantinga
452c3634d4 Fixed two cases where joystick/haptic objects should be marked invalid on error during open. 2026-08-24 16:31:46 -07:00
muzikbike
40e1357e29 Add Wake Up key code for Windows
deduced experimentally via experimentation with consumer hardware
2026-08-24 15:36:53 -07:00
Sam Lantinga
6648b7966c Added a Windows mapping for the Gamesir-G5
Fixes https://github.com/libsdl-org/SDL/issues/16190
2026-08-24 13:14:22 -07:00
Sam Lantinga
05a0cb5894 Added detection for Turtle Beach Xbox 360 controllers 2026-08-24 13:08:06 -07:00
Frank Praznik
9d2579db26 wayland: Don't presume that the window is non-resizable when hidden
Don't presume that the window requires fixed size handling until a configure event sets the state. Fixes setting an initial size on a hidden window (regression from fcb5ef8a9c).
2026-08-24 14:07:46 -04:00
Eri the Switch
fb8a32cc75 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.
2026-08-24 09:53:47 -07:00
quasar32
be51a15ba2 Hit test no longer executes when destroying wayland window
Signed-off-by: quasar32 <fontejam32@gmail.com>
2026-08-24 10:48:05 -04:00
muzikbike
9712c2c7fc Add some missing Microsoft keyboard codes
Deduced experimentally using https://git.stary.pc.pl/Grzesiek11/w32ev
2026-08-24 07:40:39 -07:00
Sam Lantinga
58702e533f GPU: D3D12: set MultisampleEnable for multisampled pipelines (thanks @sailro!)
Closes https://github.com/libsdl-org/SDL/pull/16183
2026-08-23 10:51:48 -07:00
Dario Binacchi
e721af3baf 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>
2026-08-23 10:35:08 -07:00
Sam Lantinga
8b1e4aa41b 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
2026-08-23 10:32:18 -07:00
Jaan Soulier
a2b27528db fix SDL_gpu_vulkan validation warning 2026-08-22 08:43:21 -07:00
Sam Clegg
f0b84476f9 [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.
2026-08-22 07:33:14 -07:00
Anonymous Maarten
eda0859c8b cpu is always SDL_CPU_ANY in SDL_GeneratedBlitFuncTable 2026-08-21 08:14:13 -07:00
Anonymous Maarten
36b7ce3b4e The spinning cube GPU example triggers a few parameter validation errors for an offscreen renderer 2026-08-21 07:44:30 -07:00
Cameron Cawley
199770a1ec n3ds: Fix joystick hat input 2026-08-20 08:03:09 -07:00
muzikbike
2ca12ab2cf Separate KEY_KPJPCOMMA from KEY_MUHENKAN
Both were mapped to "International 5", but this seems wrong
2026-08-20 08:02:09 -07:00
Cameron Cawley
6f3d0c1337 Include transparency information for icon.png in the image data 2026-08-20 07:57:18 -07:00
Ryan C. Gordon
c5491474de pen: If a pen leaves proximity, force all its pressed buttons to released.
Some platforms do this for us, but just in case there is a badly-behaved one,
this will help keep application state correct.

Reference Issue #16125.
2026-08-18 16:08:21 -04:00
Ryan C. Gordon
3bdb7d00d5 pen: Report SDL_PenInputFlags in SDL_PenProximityEvent.
Fixes #16125.
2026-08-18 16:07:51 -04:00
Caleb Cornett
f2c4ef111d gdk: Update to GDK April 2026 Update 3 (#16134) 2026-08-18 10:51:48 -04:00
Caleb Cornett
c80d68fde5 gdk: Send window resize events on Xbox (#16158) 2026-08-16 12:12:09 -04:00
Christmas-Missionary
11a9d3212e SDL_VideoQuit to SDL_QuitVideo
- Refers to SDL3 internal function, NOT SDL2 public function
2026-08-15 01:30:12 -04:00
Christmas-Missionary
23401052e5 SDL_CameraInit to SDL_InitCamera 2026-08-15 01:30:12 -04:00
Christmas-Missionary
19758eb15d SDL_VideoInit to SDL_InitVideo
- Refers to SDL3 internal function, NOT SDL2 public function
- FIXME comment is removed as naming convention is established
2026-08-15 01:30:12 -04:00
Revincx
b640b804a8 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.
2026-08-10 09:08:21 -07:00
xentripetal
b340ddcd7b 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.
2026-08-09 11:59:42 -07:00
Sawkez
700cf42a9d Haiku: Fix incorrect version macro in SDL_SYS_OpenURL 2026-08-06 10:35:15 -07:00
Mathieu Eyraud
ad19bafd12 Fix tray menu pointer check 2026-08-06 07:46:30 -07:00
XRenWu
eba3c7ae0a feat: add GameSir-Tarantula 8K controller support
- Add VID/PID and button mapping for Tarantula 8K
- Remove outdated joystick dead zone algorithm, pass raw data directly
- Correct naming of extension keys
2026-08-05 10:23:49 -07:00
Frank Praznik
2afc369e8a 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.
2026-08-05 11:05:12 -04:00
Frank Praznik
b23ae0eec7 wayland: Fix a circular include issue
The event header being included before a header guard was hiding a circular include issue.
2026-08-05 10:57:34 -04:00
Frank Praznik
2bf7014836 wayland: Move include after the guard 2026-08-05 10:38:52 -04:00
capitalistspz
355d1ac848 camera: Detect exclusive_caps v4l2loopback devices (#16116) 2026-08-05 07:32:57 -07:00
zuiki_inn
f1c274038b add EVOTOP AXIS controller support (#16117) 2026-08-05 07:29:17 -07:00
Frank Praznik
b07d488216 wayland: Place the data source creation functions in the proper source file
These functions were declared in the SDL_waylanddatamanager.h header, but the implementations were in SDL_waylandevents.c

Move the implementations to the SDL_waylanddatamanager.c source file, where one would expect to find them.
2026-08-04 13:01:53 -04:00
Ozkan Sezer
f661f37ace update khronos headers from mainstream. 2026-08-04 03:28:10 +03:00
Evan Hemsley
c1aa9f43fa GPU: Fix another OpenXR zero-length copy 2026-08-03 14:48:50 -07:00
Evan Hemsley
5538d52430 GPU: Allow combinations of read flags on buffers (#16111) 2026-08-03 13:16:20 -07:00
Evan Hemsley
eeb832d8a1 GPU OpenXR: Fix zero-length copy (#16112) 2026-08-03 13:11:32 -07:00
Caleb Cornett
f0fc9316f0 gpu: D3D12 driver cleanup (#16104)
- Clean up unused code in D3D12 driver
- Set accurate array sizes in D3D12_INTERNAL_Create*RootSignature
- Clean up D3D12 conversion functions
2026-08-03 13:11:10 -07:00
Caleb Cornett
52cea907e0 gpu: Use DXBC for D3D12 blit shaders on Windows (#16095) 2026-08-03 13:10:30 -07:00
Ryan C. Gordon
f17fc121aa cocoa: SDL_GetClipboardData() needs to conform the mimetype.
Fixes #16077.
2026-08-03 11:52:13 -04:00
Sanjay Govind
591b584b27 Add back metadata reset change that was accidentally reverted 2026-08-03 08:14:05 -07:00
Ryan C. Gordon
958c4cbf0d cocoa: Use macOS 26.x mouse workaround for all windows, not just fullscreen.
This is a temporary workaround until we understand the issue better.

Reference Issue #15967.
2026-08-03 02:19:24 -04:00
Sanjay Govind
7010faef34 Add support for GIP instruments via hidapi, and drums via gameinput (#16009) 2026-08-02 16:27:46 -07:00