mirror of
https://github.com/SK8-ENGINE/skate-3-rust-engine.git
synced 2026-10-27 19:54:40 +00:00
Implements issue #14. A dedicated thread owns SDL3 (3.4.16, statically linked via sdl3 =0.20.0) and publishes per-slot snapshots re-expressed as the XInput-shaped XboxState, so the TU3 conversion in skate-core is unchanged. Conversions are exact for XInput-backed pads (stick Y via bitwise NOT, trigger round-to-nearest). SKATE3_INPUT=xinput selects the original transport, which is also the fallback if SDL fails to start. Optional settings/controller.json maps paddles to XInput buttons. Build: scripts/Ensure-CMake.ps1 locates CMake (PATH or Visual Studio's copy) for the SDL source build. sdl3-sys is vendored with a build.rs patch setting CMAKE_MSVC_RUNTIME_LIBRARY from crt-static, because SDL's CMake (policy CMP0091) ignores cmake-rs' -MT and the static-CRT release build failed with unresolved __imp_* symbols. See docs/hails-additions/03-sdl3-gamepad-input.md and vendor/README.md.