Description
Hi there,
I’m looking at exposing some more of the Joystick and Gamepad APIs and running into some weirdness.
I suspect the reason SDL_GameControllerGetJoystick
isn’t shadowed in the GameController
object has something to do with the fact that disposing of that Joystick
object before the GameController
object might be dangerous.
To that end, it seems it is impossible, without using joystick IDs themselves, to use Joystick
methods on a GameController
.
Would it be worthwhile, perhaps, to define Joystick
methods as a trait, and implement it for both types, with the versions for GameController
implicitly taking care of using SDL_GameControllerGetJoystick
?
I have a branch I’m working on to expose PowerLevel
data from Joystick
objects, and I’ve realised that getting to it from a GameController
will be slightly odd :)
Thanks in advance!