CMake Build Errors: Reject an SDL2 without HIDAPI and SPIRV-Tools Fallback
Recent upstream commits (post-v0.1.1) enforce strict hardware controller polling requirements. CMake now checks for SDL2 HIDAPI support and will fail if the system SDL2 library lacks USB/Bluetooth joystick descriptor access.
Linux distributions often package a minimal libsdl2-dev without HIDAPI support, or Windows builds link against outdated SDL2.dll versions. Additionally, SPIRV-Tools submodule must be fetched to decode PS5 shader ISA.
check_circleVerified Resolution Steps
Install libsdl2-dev with HIDAPI Support (Ubuntu/Debian)
Ensure the system SDL2 package includes libusb and hidapi backend dependencies before running cmake.
sudo apt-get update && sudo apt-get install -y libsdl2-dev libhidapi-dev libusb-1.0-0-devEnable Fallback to Bundled Shared SPIRV-Tools
Pass the CMake flag -DANYPS5_ENABLE_SPIRV_TOOLS=ON to force the build system to compile the bundled SPIRV-Tools shader compiler.
cmake -B build -S . -DANYPS5_ENABLE_SPIRV_TOOLS=ON -DCMAKE_BUILD_TYPE=ReleaseVerify Build Linkage
Compile with multi-threaded build flag and verify the output binary links against the correct SDL2 shared object.
cmake --build build --config Release -j$(nproc)help_outlineFrequently Asked Questions
Why does AnyPS5 require SDL2 with HIDAPI?
PS5 DualSense controllers utilize advanced USB HID reports for adaptive triggers, gyro motion sensors, and haptic feedback. Standard SDL joystick APIs cannot access these raw telemetry streams without HIDAPI.