22006 Commits

Author SHA1 Message Date
Ozkan Sezer
29f7f08261 pdate openxr headers from khronos. 2026-05-24 18:40:50 +03:00
Cameron Cawley
f162c49dc1 Use SDL_PIXELFORMAT_INDEX8 for the debug font atlas 2026-05-24 08:00:21 -07:00
Ryan C. Gordon
6c55fad411 examples/demo/04-bytepusher: go back to showing help text on load failures.
If the VM was already running, and then a file failed to open at all (a
directory was dropped on the window, etc), this wouldn't go back to showing
the help text.
2026-05-23 23:56:48 -04:00
Ryan C. Gordon
800f347e5e examples/demo/04-bytepusher: Remove render target.
This doesn't need a render target to function. The comment suggested it was
needed to make debug text look better when scaled, but maybe logical
presentation used to do linear scaling exclusively at the time?
2026-05-23 23:56:18 -04:00
Ozkan Sezer
ae07e32269 SDL_itoa(): use _itoa_s(), not _ltoa_s()
typo introduced by commit 33c9f1a70a
2026-05-23 20:11:10 +03:00
Frank Praznik
0a96d47599 wayland: Remove focus references when a pointer capture ends on a subsurface
The core mouse code will unfocus the window when a capture ends outside the window boundaries, but the backend still needs to update the internal focus references.
2026-05-23 12:20:30 -04:00
0xDEADCADE
3626598675 Remove CenterPad and RightStick from Steam Controller (2015) internal state struct
These values are never used for the Steam Controller (2015), as it does not physically have these inputs.
2026-05-23 07:51:03 -07:00
Frank Praznik
e7b238a6ed Fix casting errors 2026-05-22 12:30:11 -04:00
Frank Praznik
5f8eb44541 wayland: Handle captured pointer movements over a subsurface
Some compositors will send pointer enter/leave event while moving between surfaces that are part of the same window while mouse capture is active. Maintain window focus in this case, and adjust the coordinates relative to the content surface by the subsurface offset, if necessary.
2026-05-22 11:47:23 -04:00
Ryan C. Gordon
9fe200c215 examples/renderer/20-blending: Note when a blend mode is unsupported. 2026-05-22 10:37:15 -04:00
Ryan C. Gordon
39be8a703f examples/renderer/20-blending: center alpha and instructional text.
Otherwise, it tends to get lost behind the "Source Code" tab in the web
builds, if the browser window is too small.
2026-05-22 10:37:14 -04:00
Jason Millard
290f0c831f iOS: Fix SDL_EVENT_DROP_FILE lost on cold start from URL open 2026-05-22 07:16:43 -07:00
Bitwolf
2f13731d23 Update Famicom controllers to a more user friendly name. 2026-05-22 07:15:17 -07:00
Vittorio Romeo
7f03da9588 emscripten: dedupe keyboard event listeners across multiple windows 2026-05-22 07:11:10 -07:00
kholo
2bb6df90ad Ignore Huion Tablet Kamvas Pro 22 2026-05-22 07:05:57 -07:00
Anonymous Maarten
6243fa2ffd Fix -Wempty-body warnings in SDL_malloc.c
ABORT is used in the assert macro.
2026-05-21 22:50:32 +02:00
Anonymous Maarten
33c9f1a70a Fix -Wdeprecated-declarations warnings
An alternative could be to define _CRT_SECURE_NO_WARNINGS
2026-05-21 22:50:32 +02:00
Sam Lantinga
6b4ae68460 android: fixed a possible joystick-related deadlock on application termination 2026-05-21 12:20:03 -07:00
Sam Lantinga
fe1918a47f Fixed build 2026-05-21 10:05:20 -07:00
Sam Lantinga
13f91a67fc Fixed Ipega controllers being ignored in keyboard mode (thanks @AntTheAlchemist!) 2026-05-21 09:56:42 -07:00
Sam Lantinga
3545bad589 Process repeated joystick key events on Android
This prevents them from being interpreted as keyboard keys by the Java code, and if internally we are treating them as keyboard keys, they'll be repeated properly.

Fixes https://github.com/libsdl-org/SDL/issues/15664
2026-05-21 06:53:17 -07:00
Sam Lantinga
516f4a0bd5 Added notes about faster crc32() options 2026-05-20 17:32:01 -07:00
Sam Lantinga
47c8dcc968 android: handle sensor registration synchronized in one place 2026-05-20 15:55:24 -07:00
Sam Lantinga
19d73016e8 Fixed a rare crash on Raspberry Pi when creating a window 2026-05-20 15:11:09 -07:00
Sam Lantinga
0dbd9d2a65 Fixed a rare crash on Raspberry Pi when creating a window 2026-05-20 14:56:54 -07:00
Frank Praznik
ef9a5b7040 x11: Ignore slave button presses when the window lacks keyboard focus
XInput2 can send slave button presses before FocusIn events, which can confuse the click-through suppression logic. A window must have keyboard focus to grab the mouse anyway, so ignore slave presses when lacking keyboard focus.
2026-05-20 13:05:38 -04:00
Frank Praznik
8371c09aa7 x11: Reject click-through button events based on serial
XInput2 may send mouse buttons presses on both the master and slave devices, and the click-through button event should be ignored on both if required.
2026-05-20 13:05:38 -04:00
Ryan C. Gordon
9a56bc66b5 assert: fixed compiler warning with LLVM + x86_64-pc-windows-msvc target.
Fixes #15578.
2026-05-20 13:02:41 -04:00
Ryan C. Gordon
f8dab6ad51 README-migration: Note that render target support is not universally available.
Fixes #15474.
2026-05-20 12:51:41 -04:00
Ryan C. Gordon
d8f42ee069 examples/renderer/20-blending: Make thumbnail/onmouseover match other examples. 2026-05-20 00:42:57 -04:00
Ryan C. Gordon
8fe1d7faec examples/save-rendering-to-bitmaps: Dump alpha channel.
examples/renderer/20-blending triggered this: the renderer's framebuffer has
an alpha channel, even if the window itself doesn't, so we ended up with some
weird rendering in the onmouseover.webp when I rebuilt it.
2026-05-20 00:40:25 -04:00
Vittorio Romeo
35098e927c emscripten: don't dispatch user input to hidden windows 2026-05-19 21:15:22 -07:00
Ahmed Lyas
c9e2e732b6 examples: Add blending example (#15657) 2026-05-19 21:05:23 -07:00
Sam Lantinga
f9380e15de visionOS: fixed mousewheel values
Here are the observed values using a Bluetooth mouse on visionOS 26.5

Slow scroll up:
Mouse scroll: 0,-0.017334
Mouse scroll: 0,0
Mouse scroll: 0,-0.017334
Mouse scroll: 0,0

Slow scroll down:
Mouse scroll: 0,0.017334
Mouse scroll: 0,0
Mouse scroll: 0,0.017334
Mouse scroll: 0,0

Fast scroll up:
Mouse scroll: 0,-0.017334
Mouse scroll: 0,-9.36021
Mouse scroll: 0,-100.08
Mouse scroll: 0,-75.2287
Mouse scroll: 0,-82.2284
Mouse scroll: 0,-92.0137
Mouse scroll: 0,-95.1917
Mouse scroll: 0,-101.846
Mouse scroll: 0,-203.266
Mouse scroll: 0,0

Fast scroll down:
Mouse scroll: 0,0.017334
Mouse scroll: 0,11.424
Mouse scroll: 0,59.3571
Mouse scroll: 0,68.7859
Mouse scroll: 0,267.834
Mouse scroll: 0,95.0823
Mouse scroll: 0,201.809
Mouse scroll: 0,0
2026-05-19 15:41:04 -07:00
Sam Lantinga
cfed9b3aca Allow setting NULL palette on any surface
Fixes https://github.com/libsdl-org/SDL/issues/15654
2026-05-19 14:22:32 -07:00
Ozkan Sezer
f19dca3ca0 SDL_rawinputjoystick.c: fixed a type redefinition error 2026-05-19 18:55:20 +03:00
Ozkan Sezer
42c4a0e30f SDL_windows_gaming_input.c: work-around to build against old SDKs.
Fixes https://github.com/libsdl-org/SDL/issues/15646
2026-05-19 17:25:56 +03:00
Ozkan Sezer
169480a352 hidapi/netbsd: import mainstream commit 7e994d8671:
https://github.com/libusb/hidapi/commit/7e994d8671 - authored by
Izumi Tsutsui:

netbsd: check not only addr 0 but also addr 1 to find root hubs

On NetBSD xhci(4) uses 'addr 0' for the root hub but all drivers for
other host controllers use 'addr 1' for the root hub.
 https://gnats.netbsd.org/60073
2026-05-19 17:22:50 +03:00
Kuratius
6ed1de089c Fix touchpad finger detection on Steam Deck 2026-05-19 06:52:17 -07:00
Ozkan Sezer
48fe7b7d6a SDL_wasapi.c: added comment about SDL_AudioClientProperties workaround 2026-05-19 11:21:04 +03:00
Sam Lantinga
0e480bee30 visionOS: re-enable dimming mode 2026-05-18 16:59:01 -07:00
Sam Lantinga
7f7c1628cb visionOS: use black instead of white for the mouse overlay
White is easier to see and people notice the overlay showing up when mouse input is enabled
2026-05-18 13:43:09 -07:00
Sam Lantinga
b4ebf70e0c visionOS: dimming doesn't seem to be reliable, so disable it for now 2026-05-18 13:43:09 -07:00
Sam Lantinga
e759cc850e Added an internal type for the Nintendo Switch 2 Pro controller 2026-05-18 09:23:38 -07:00
Frank Praznik
f31ca02723 video: Windows keep any position set when in fullscreen after leaving fullscreen
Adds an automated test for the behavior as well.
2026-05-18 09:09:49 -07:00
Susko3
b608108593 Properly fix cursor position in Korean IME 2026-05-18 09:01:01 -07:00
Ahmed
b5ac641372 examples: Fix float division 2026-05-18 09:00:12 -07:00
Ozkan Sezer
bf03728873 wasapi: workaround that AudioClientProperties->Options not being available in old SDKs
Closes: https://github.com/libsdl-org/SDL/issues/15641.
2026-05-18 18:55:57 +03:00
Gabriel Wang
508450e9c0 adds Blit565to565SurfaceAlphaSVE2 2026-05-18 07:10:05 -07:00
Gabriel Wang
e07cfdff2c adds sdl_sve_chn_blend_with_mask_fast for RGB565 alpha-blending 2026-05-18 07:10:05 -07:00