This PR includes small improvements to the GameInput joystick backend:
- Device subtypes
- Compatibility with DirectInput joystick mappings (if the controller is not a gamepad, i.e. `GAMEINPUT_InternalIsGamepad()` returns `false`)
- Fallback to DirectInput/XInput for currently unsupported devices (force feedback ones and the ones that are neither gamepads nor controllers, I'm not sure if that's possible, but maybe racing wheels and other device subtypes would count?)
We are locked to version 1 of the ABI, so don't load what might be a symlink to a newer and incompatible version.
Platforms like OpenBSD that only have .so versions of libraries can add a special case here like Android in the future.
Fixes https://github.com/libsdl-org/SDL/issues/15172
Read capabilities when using xinput controllers via the libusb backend
This gives us access to the subtype on linux and macOS, and gives us a lot of data we can use for handling more detailed device types when I look into a unified api for exposing instrument data later.
PS4/5 controllers put device specific data into a specific region in the report, so we have to extract it separately.
No known guitars use the right stick on the guitar, so to keep things working similarly to PS3, i have opted to map whammy and tilt the same way as the PS3 rb guitars.
Updated testgdk to demonstrate correct handling of suspend/resume and the new Render APIs, and updated the docs to explain the correct usage of these GDK functions.
Apparently, because PlaneSlice wasn't initialized, we couldn't use SDL_GPU_TEXTURETYPE_2D_ARRAY and SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE together, as the error d3d12:
"ID3D12Device::CreateUnorderedAccessView occurred: The PlaneSlice -858993460 is invalid when the resource format is R8G8B8A8_UNORM and the view format is R8G8B8A8_UNORM. Only Plane Slice 0 is valid when creating a view on a non-planar format. [ STATE_CREATION ERROR #344: CREATEUNORDEREDACCESSVIEW_INVALIDPLANESLICE]"
- Use exact numerator/denominator from spec for CMTime to avoid rounding errors.
- Wrap frame rate setting in @try-catch to prevent crashes on strict drivers.
Don't disable this functionality when defining SDL_LEAN_AND_MEAN, but if you need to, you can define SDL_DISABLE_STB if you want to compile this out.
Fixes https://github.com/libsdl-org/SDL/issues/15139
This Visual Studio 2019 compiler wrongly emits a warning.
test\testvulkan.c(271): error C2220: the following warning is treated as an error
test\testvulkan.c(271): warning C4090: 'function': different 'const' qualifiers
test\testvulkan.c(286): warning C4090: 'function': different 'const' qualifiers
Wayland is sometimes at-odds with clients that want to enforce an aspect ratio or min/max window size, as certain window states have dimensions that either must be obeyed (maximized), or will give terrible results if they aren't (tiled). Use a viewport and a masking subsurface to handle cases where surfaces are unable to match the exact window size.
The changes made to accommodate this also catches some additional windowing related edge-cases, simplifies synchronization, and prevents commits before a buffer has been attached to the surface.