Commit Graph

398 Commits

Author SHA1 Message Date
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
23b487ceda Added testyuv to the SDLTest Xcode project 2025-10-13 15:27:13 -07:00
Sam Lantinga
ee622c570a Made SDL_dlopennote.h a public header 2025-10-10 12:47:42 -07:00
Sam Lantinga
e1305ec2e2 Updated Xcode project for the switch to png test data 2025-10-10 10:14:07 -07:00
Cameron Cawley
0f62b7c3b4 Remove teststreaming 2025-10-07 11:12:31 -07:00
Sam Lantinga
baed512453 Fixed building tests on visionOS 2025-09-29 13:28:00 -07:00
Sam Lantinga
a662d13f73 Fixed building testautomation on iOS 2025-09-22 10:09:30 -07: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
Sam Lantinga
3c627390bb Updated deployment target to VisionOS 1.3 2025-09-12 10:28:44 -07:00
DominusExult
a223481ed3 xcFramework: Removing the simulators' debug symbols to reduce file size. 2025-09-02 08:57:18 -07:00
DominusExult
98c03c644a Adding dSYMs (DWARF debug symbols) to the xcFramework.
Needed to generate debug symbols for both release and debug builds and explicitly set the format so all arches actually generate the dSYMs.
This allows distributing an SDL3 app to the AppStore without the need to generate the dSYMs via script when using either the xcFramework or embedding the SDL3 Xcode project.
Fixes #13573
2025-08-31 15:33:58 -07: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
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
mattbsage
f62572344f Clean up INTERFACE_COMPILE_OPTIONS
The extra text causes Meson/Ninja builds to fail as headers are not found.
2025-05-24 19:13:25 -07:00
Sam Lantinga
6f994cc7a8 Fixed macOS build 2025-05-22 10:18:14 -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
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
b0df1cbbef Updated to version 3.3.0 for development 2025-03-01 19:31:00 -08:00
Sam Lantinga
65864190cc Added testpen to the Xcode test project 2025-03-01 18:49:25 -08:00
Sam Lantinga
292e431748 Updated to version 3.2.6 for release 2025-03-01 18:30:34 -08:00
Sam Lantinga
db4e6c1931 Cocoa metal layers need their size updated before renderer updates
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
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
Sam Lantinga
982094c85c Updated to version 3.2.5 for development 2025-02-06 16:40:59 -08:00
Sam Lantinga
b5c3eab6b4 Updated to version 3.2.4 for release 2025-02-06 16:03:43 -08:00
Sam Lantinga
be991239d9 Updated to version 3.2.3 for development 2025-02-01 17:43:38 -08:00
Sam Lantinga
2fa1e7258a Updated to version 3.2.2 for release 2025-02-01 17:01:45 -08:00
Anonymous Maarten
303fd5ed5a release: rename resources/cmake -> resources/CMake in dmg 2025-01-24 20:08:25 +01:00
Anonymous Maarten
fdf33f9047 xcode+cmake: Use SDL3.framework/SDL3 as IMPORTED_LOCATION
Not adding /SDL3 causes CMake to no longer set the RUNPATh on
binaries in the build directory.
It also breaks compatibility with CMake versions older then 3.28.

reverts c56a3f60fe (xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION)
reverts ad3c7b92f8 (xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION)
2025-01-24 20:07:51 +01:00
Sam Lantinga
77b520e93e Updated to version 3.2.1 for development 2025-01-21 14:02:06 -08:00
Sam Lantinga
535d80bade Include the README and related files in the SDL framework 2025-01-21 10:51:21 -08:00
Sam Lantinga
a52fc209bb Updated to version 3.2.0 for release 2025-01-21 08:52:28 -08:00
Anonymous Maarten
dbe3baeb0f release: document using the xcframework with CMake 2025-01-18 06:29:17 -08:00
Sam Lantinga
ad3c7b92f8 xcode+cmake: use SDL3.framework folder as IMPORTED_LOCATION
[ci skip]
2025-01-18 06:27:21 -08:00
Sam Lantinga
eb168e410c Updated to version 3.1.11 for development 2025-01-16 11:41:28 -08:00
Sam Lantinga
1dd8fadca2 Updated to version 3.1.10 for the release candidate 2025-01-16 08:33:18 -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
5f4696ce63 Updating documentation for the 3.2.0 release
* Simplified and updated the mingw release archive

* Simplified and updated the msvc release archive

* Updated the Xcode release archive

* Updated the Android release archive
2025-01-15 20:38:16 -08:00
Sam Lantinga
a4547fe77a Updated weak framework dependencies for new deployment targets 2025-01-14 17:00:30 -08:00
Sam Lantinga
cdde6dd7bb Bumped deployment requirements for Apple platforms
We require at least Xcode 12.2 and macOS SDK 11 to build. We support deploying to macOS 10.13, iOS 11.0, and tvOS 11.0.

This cleans up the code significantly
2025-01-14 12:03:07 -08:00
Sam Lantinga
e6bb50a710 Updated to version 3.1.9 for development 2025-01-07 17:51:00 -08:00
Sam Lantinga
d7b10d05b1 Updated to version 3.1.8 for the preview release 2025-01-07 17:04:05 -08:00
Sam Lantinga
f2074d7af3 Updated copyright for 2025 2025-01-01 07:45:52 -08:00
Ryan C. Gordon
f6143da617 uikit: Patched to compile, added to Xcode project. 2024-12-28 15:36:02 -05:00
Sam Lantinga
c714b1a38b Fixed public header inclusion in the Xcode project 2024-12-28 08:47:00 -08:00
Sam Lantinga
ec29d3fd66 Define NDEBUG in release Xcode builds 2024-12-28 08:25:09 -08:00