You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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 theGameController
object has something to do with the fact that disposing of thatJoystick
object before theGameController
object might be dangerous.To that end, it seems it is impossible, without using joystick IDs themselves, to use
Joystick
methods on aGameController
.Would it be worthwhile, perhaps, to define
Joystick
methods as a trait, and implement it for both types, with the versions forGameController
implicitly taking care of usingSDL_GameControllerGetJoystick
?I have a branch I’m working on to expose
PowerLevel
data fromJoystick
objects, and I’ve realised that getting to it from aGameController
will be slightly odd :)Thanks in advance!
The text was updated successfully, but these errors were encountered: