SDL/src
Peter0x44 5a9050aea3 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

(cherry picked from commit 705ced8cf5)
2025-10-14 16:58:04 -07:00
..
atomic
audio wav: Patched to compile on Visual Studio. 2025-09-22 08:14:33 -07:00
camera Support Google Play 16 KB Page Size Requirement (#13470) 2025-07-31 16:21:02 -07:00
core fill-in missing DeleteLocalRef calls 2025-10-13 09:28:44 -07:00
cpuinfo Define illegal_instruction() when it will be actually used 2025-05-08 12:50:08 -07:00
dialog cocoa: Don't minimize fullscreen windows for a modal file dialog. 2025-07-11 15:06:10 -04:00
dynapi
events Fixed SDL_RunOnMainThread() on Android 2025-09-21 13:58:51 -07:00
filesystem fs: Fix OpenBSD path retrieval 2025-08-30 14:21:24 +03:00
gpu GPU: Correctly recycle D3D12 descriptor heaps (#14234) 2025-10-13 13:00:38 -07:00
haptic linux/SDL_syshaptic.c:SDL_SYS_HapticStopAll(): Fix return on error 2025-08-09 09:28:02 -07:00
hidapi Fixed HIDAPI controller disconnect reading on multiple threads 2025-09-25 10:41:52 -07:00
io Clarify why we ignore EINVAL when flushing a file descriptor 2025-09-14 15:39:53 -07:00
joystick Fix thread safety attributes for TryLock functions 2025-10-14 12:47:58 -07:00
libm
loadso
locale
main Set preferredFrameRateRange in main callbacks CADisplayLink 2025-09-06 10:13:44 -07:00
misc
power
process Fixed process I/O redirection to NUL on Windows 2025-04-11 15:45:33 -07:00
render Make D3D math functions static inline to reduce likelihood of linking conflicts 2025-10-14 16:58:04 -07:00
sensor
stdlib SDL_mslibc: Implement _ftoul2_legacy() 2025-10-03 07:22:59 -07:00
storage storage: Declare a private bootstrap for NDA user storage 2025-05-30 12:15:43 -04:00
test Removed help for obsolete (and removed) command line option 2025-03-12 12:38:52 -07:00
thread Fixed memory leak when using detached threads 2025-09-14 08:43:12 -07:00
time time: Fix compilation on Solaris 2025-03-19 12:27:39 -04:00
timer
tray Fix #13083 segfault in SDL_RemoveTrayEntry() for submenu entries 2025-05-21 13:32:47 -07:00
video Only pass UIPress from game controllers and remotes if the're not open 2025-10-14 12:44:23 -07:00
SDL.c check SDL_PLATFORM_WINDOWS instead of SDL_VIDEO_DRIVER_WINDOWS when using SDL_HelperWindow 2025-07-12 07:48:56 -07:00
SDL_assert.c emscripten: Don't use legacy JS library functions for assertions 2025-03-20 16:32:40 -07:00
SDL_assert_c.h
SDL_error.c
SDL_error_c.h Save and restore error messages when rolling back after failed init 2025-03-02 07:57:36 -08:00
SDL_guid.c
SDL_hashtable.c hashtable: Redesign the hashtable API. 2025-02-15 18:52:56 -05:00
SDL_hashtable.h hashtable: Redesign the hashtable API. 2025-02-15 18:52:56 -05:00
SDL_hints.c Added special handling for SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY 2025-04-03 11:34:03 -07:00
SDL_hints_c.h
SDL_internal.h Added macros to push/pop error messages while cleaning up 2025-05-29 10:54:46 -07:00
SDL_list.c
SDL_list.h
SDL_log.c
SDL_log_c.h
SDL_properties.c Don't allow further operations on properties while we're destroying them 2025-02-26 08:34:14 -08:00
SDL_properties_c.h
SDL_utils.c Added support for the HORI Taiko No Tatsujin Drum Controller 2025-04-02 08:30:55 -07:00
SDL_utils_c.h Include the VID/PID of generic keyboard/mouse devices on Windows 2025-02-27 14:03:39 -08:00