Add support for SDL3 joystick input driver

Made possible by EIREXE, xsellier and the SDL team.

This commit includes statically linked SDL3 for Windows, Linux and macOS.
The vendored copy of SDL3 was setup to only build the required subsystems
for gamepad/joystick support, with some patches to be able to make it as
minimal as possible and reduce the impact on binary size and code size.

Co-authored-by: Álex Román Núñez <eirexe123@gmail.com>
Co-authored-by: Xavier Sellier <xsellier@gmail.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
Nintorch 2025-05-28 14:22:20 +05:00 committed by Rémi Verschelde
parent 987832be46
commit 0b3496fb4f
No known key found for this signature in database
GPG key ID: C3336907360768E1
330 changed files with 154930 additions and 1561 deletions

View file

@ -67,6 +67,14 @@
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4
#endif
#ifndef SAFE_RELEASE // when Windows Media Device M? is not present
#define SAFE_RELEASE(x) \
if (x != nullptr) { \
x->Release(); \
x = nullptr; \
}
#endif
template <typename T>
class ComAutoreleaseRef {
public:
@ -90,8 +98,6 @@ public:
}
};
class JoypadWindows;
class OS_Windows : public OS {
uint64_t target_ticks = 0;
uint64_t ticks_start = 0;