169 Commits
Author SHA1 Message Date
Sam Lantinga 36f621842b Use the Microsoft provided GameInputCreate() function (#15797)
It does better version checking and has better compatibility.

This also fixes a crash in GameInputRedist.dll when attempting to load v3 when v2 is installed on the system. In this case, a thread is created in GameInputCreate() which is not cleaned up when the object is released, and can crash later with a NULL pointer dereference.
2026-06-10 12:57:43 -07:00
Frank Praznik 984b03680f Add the Windows notification driver
Notifications are supported on Win10 and above.
2026-06-10 13:25:38 -04:00
Frank Praznik 068e405912 Add notification framework with test and dummy driver 2026-06-10 13:25:38 -04:00
Caleb Cornett 12a435e11d gdk: Update Suspend/Resume best practices.
Updated testgdk to demonstrate correct handling of suspend/resume and the new Render APIs, and updated the docs to explain the correct usage of these GDK functions.
2026-03-07 11:19:09 -05:00
Ethan Lee c20a058ff4 Revert "render: Added Xbox DXIL for gpu backend".
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
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:07 -05:00
Ethan Lee f2c4c66429 render: Added Xbox DXIL for gpu backend
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2026-03-01 19:09:55 -05:00
Ethan Lee ea539c0075 testgdk: Update icon filename for the new png image 2026-02-26 10:44:58 -05:00
Ethan Lee 5770e013c2 gdk: Render/GPU can call SuspendX, document when to call SuspendComplete 2026-02-25 09:20:25 -05:00
chenzw bb8eee8fac Added support for the GameSir-G7 Pro 8K controller 2026-02-03 20:09:04 -08:00
9a91d7236a GPU: OpenXR integration (#14837)
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Based on Beyley's initial draft in #11601.

Co-authored-by: Beyley Cardellio <ep1cm1n10n123@gmail.com>
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
2026-01-30 17:18:51 -05:00
Sam Lantinga 5f086e7623 Updated copyright for 2026 2026-01-01 09:40:08 -08:00
Anonymous Maarten 6665ebaa2e SDL_test: allow disabling colorized output 2025-12-15 23:19:25 +01:00
Sam Lantinga 450a2cb5e4 Added support for parsing the Xbox report descriptor
This gives us more robust handling of Bluetooth Xbox controllers which may vary the report format between firmware versions.

Firmware versions tested:
Xbox One S: 3.1.1, 4.8.1923, 5.13.3143
Xbox One S/X: 5.11.3118, 5.23.6
Xbox Elite Series 2: 5.22.16, 5.23.6

Fixes https://github.com/libsdl-org/SDL/issues/14597
2025-12-10 10:49:39 -08:00
Sam Lantinga d0926d380e Added SDL_hidapi_steam_triton.c to the GDK Visual Studio project 2025-11-12 11:54:48 -08:00
Sam Lantinga e18d63a4e2 Added SDL_RotateSurface()
Fixes https://github.com/libsdl-org/SDL/issues/14269
2025-10-22 17:55:02 -07:00
Peter0x44 705ced8cf5 Make D3D math functions static inline to reduce likelihood of linking conflicts
Convert SDL_d3dmath.c functions to static inline in SDL_d3dmath.h to make
it less likely to conflict when static linking SDL. raylib's SDL backend
does not work with a "normal" upstream binary static link. It has these
errors:

/usr/bin/ld: /usr/local/lib64/libSDL3.a(SDL_d3dmath.c.o): in function `MatrixIdentity':
SDL/src/render/SDL_d3dmath.c:35: multiple definition of `MatrixIdentity'; CMakeFiles/raylib.dir/rcore.c.o:rcore.c:(.text+0x18470): first defined here
/usr/bin/ld: /usr/local/lib64/libSDL3.a(SDL_d3dmath.c.o): in function `MatrixMultiply':
SDL/src/render/SDL_d3dmath.c:44: multiple definition of `MatrixMultiply'; CMakeFiles/raylib.dir/rcore.c.o:rcore.c:(.text+0x18540): first defined here
collect2: error: ld returned 1 exit status

It works if these functions aren't emitted, (i.e.
!SDL_VIDEO_RENDER_D3D(11|12|GPU|VULKAN)

Or, if SDL is not linked static. Which I know is preferred anyway.

In raylib's case, it doesn't use this code anyway so it's not a problem
to build it yourself with them disabled. But it's a minor hassle to be
incompatible with static linking libraries from upstream.

I can't see any good reason for these functions to not be static inline
already, so I just put them in the header and deleted the .c.

Raylib's conflicting case is a library with a public function exposed to
users. But SDL's case is not.

- Moved all matrix functions from SDL_d3dmath.c to SDL_d3dmath.h as static inline
- Removed SDL_d3dmath.c from all project files (Visual Studio and Xcode)
- Functions affected: MatrixIdentity, MatrixMultiply, MatrixScaling,
  MatrixTranslation, MatrixRotationX, MatrixRotationY, MatrixRotationZ
2025-10-14 16:56:41 -07:00
Sam Lantinga ee622c570a Made SDL_dlopennote.h a public header 2025-10-10 12:47:42 -07:00
Sam Lantinga bb0d6221c1 Use PNG files for tests and examples
These are much smaller than the previous BMP files

Fixes https://github.com/libsdl-org/SDL/issues/14159
2025-10-06 16:45:53 -07:00
Anonymous Maarten cdc4609993 Add headers for unsupported sources 2025-09-26 21:42:04 +02:00
zuiki_inn fc648e5546 Support ZUIKI MasconPro (#13770)
* Add ZUIKI controller

Support version:
MasconPro

Enable rumble
Disable sensors
2025-09-21 23:38:28 -07:00
Anonymous Maarten 2734248544 Remove superfluous '/utf-8' from MSBuild projects 2025-08-28 23:26:48 +02:00
Sam Lantinga 09ca7e8f64 Move libusb support into a shared location 2025-08-28 09:10:47 -07:00
Ethan Lee efea62ed61 hidapi: Add a stub driver for Switch 2.
Thanks to kiddkaffeine for the Xcode updates!
2025-08-28 09:10:47 -07:00
Sam Lantinga da6e9bbf7c Allow building the tray subsystem without the video subsystem
Fixes https://github.com/libsdl-org/SDL/issues/13235
2025-08-27 08:15:24 -07:00
mitchellcairns 18eeaea054 Implement SInput Device Support (#13343)
This implements a new SDL HID driver for a format developed by Hand Held Legend for their gamepad devices called SInput

Devices that are supported by this change with well-defined mappings

GC Ultimate ( https://gcultimate.com )
ProGCC ( https://handheldlegend.com/products/progcc-kit-wireless-wired-bundle )

The SInput format is documented here: https://github.com/HandHeldLegend/SInput-HID
2025-07-15 18:35:47 -07:00
bakatrouble 354895d975 Add Flydigi VADER 4 Pro HIDAPI support (#12874) 2025-05-22 09:56:17 -07:00
Vicki Pfau 00f3a82ada Joystick: Add new GIP driver to replace old Xbox One wired driver
This new driver is based on official documentation released by Microsoft in
September, though it still lacks several important features, notably the
Security handshake for wireless dongles and audio support. It is, however, more
reliable and extensible than the old driver.
2025-05-01 11:04:33 -07:00
Austin Almond 14ae45c2b8 GDK: Handle ProjectDir with space
The call to compile_shaders_xbox.bat fails if ProjectDir contains a space. Wrapping the command in quotes fixes the issue.
2025-04-25 15:00:51 -07:00
Sam Lantinga 8a57c83ff9 Updated to GameInput v1.1
The biggest change is that the C API is no longer available.

Here are more details:
https://www.nuget.org/packages/Microsoft.GameInput

Fixes https://github.com/libsdl-org/SDL/issues/12802
2025-04-11 13:42:58 -07:00
8BitDo e18c6bd2e7 8BitDo (#12661)
Added HIDAPI support for the 8BitDo Ultimate 2 Wireless Controller running firmware v1.03 or newer over Bluetooth.
2025-03-31 09:56:01 -07:00
Katharine Chui 35c03774f3 [SDL3] Adding input and FFB support for Logitech G29(PS3) on hidapi (#11598)
These changes enable the Logitech G29 wheel to run on hidapi with both SDL_Joystick and SDL_Haptic interfaces.

While it is already possible to use the wheel on Linux in WINE + SDL2 thanks to the in-tree evdev driver as well as new-lg4ff, these set of changes allow the G29 to be used with WINE under MacOS and FreeBSD

These wheels should also be supported, but I can only test them from G29's compat modes: G27, G25, DFGT, DFP, DFEX

Haptic and led support are ported from https://github.com/berarma/new-lg4ff
2025-03-17 07:24:39 -07:00
Sam Lantinga efe122be4d Removed width/height parameters from LoadTexture()
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
You can directly access the texture width and height now.
2025-03-14 11:38:13 -07:00
Sam Lantinga db4e6c1931 Cocoa metal layers need their size updated before renderer updates
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
Also refactored event watch code so it can be shared between internal window event dispatch and public event watchers.

Fixes https://github.com/libsdl-org/SDL/issues/12376
2025-02-24 15:37:13 -08:00
Sam Lantinga a792434a37 Added initial MJPG support using stb_image 2025-02-20 12:16:26 -08:00
Sam Lantinga 1b35ca9c32 Refactored GameInput initialization 2025-02-12 13:02:15 -08:00
Sam Lantinga cf41ccc6ce Removed stb_image.h from SDL
This adds quite a bit of code size to SDL for a niche use-case. This is easily handled in the application instead.
2025-02-10 17:18:16 -08:00
Sam Lantinga 84b0c13c44 Added support for Motion JPEG camera capture
Fixes https://github.com/libsdl-org/SDL/issues/12183
2025-02-10 17:18:16 -08:00
Quan Zhuo c9341489cc Fix #12197: Force set /utf-8 for msvc compilers (#12198)
The MSVC compiler determines the encoding of the source code based on
the BOM of the source code when reading it. If there is no BOM, it
defaults to the local encoding, which is gb2312, codepage 936, on
Simplified Chinese Windows. This can cause errors such as newline
characters in strings.
2025-02-06 09:34:41 -08:00
nightmareci 718034f5fa Remove newlines from log messages
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
2025-01-22 20:25:04 -08:00
Ryan C. Gordon 4d63a2b882 io: Renamed src/file to src/io
Fixes #11980.
2025-01-16 08:18:40 -05:00
Sam Lantinga f2074d7af3 Updated copyright for 2025 2025-01-01 07:45:52 -08:00
Semphris 0461180e25 SDL_EVENT_QUIT when no window nor tray
SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE will not fire if there are active tray icons. This impacts only applications that create tray icons, and that at least one icon outlives the last visible top-level window. SDL_EVENT_QUIT will fire when the last active tray is destroyed if there are no active windows.
2024-12-27 09:22:27 -08:00
Semphriss 01b9b0edb7 Add system tray support (#10873) 2024-12-24 10:36:39 -08:00
L zard af2dbbcb53 Merge SDL_wasapi_win32 into SDL_wasapi 2024-12-23 16:54:52 -08:00
Ethan Lee a0864799f2 GDK: Fix compile_shaders_xbox.bat build events 2024-12-20 00:57:25 -05:00
Ethan Lee 9628549c7c Xbox buildfixes 2024-12-13 11:34:39 -05:00
Sam Lantinga 6d1dac1404 Removed unused math code from the Visual Studio projects 2024-12-06 16:28:23 -08:00
Semphris a4852f3a10 SDL_ShowFileDialogWithProperties with more options 2024-12-04 15:10:15 -08:00
Ryan C. Gordon 4745aa3324 asyncio: Windows IoRing support, other tweaks and fixes. 2024-12-03 17:32:20 -05:00
Ryan C. Gordon e79ce2a200 asyncio: Added async i/o APIs. 2024-12-03 17:32:20 -05:00