sdl2 icon indicating copy to clipboard operation
sdl2 copied to clipboard

High-level GameController bindings

Open ramirez7 opened this issue 3 years ago • 0 comments

There are bindings for events, but in order to actually use the GameController interface & use those events, you must dip down into SDL.Raw:

  • You have to use SDL.Raw.gameControllerAddMappingsFromFile et al to load a mapping file.
  • You have to use SDL.Raw.gameControllerOpen to initialize the controller(s) so that events come through.
  • controllerAxisEventAxis is just an untyped Word8 despite being a C enum.
    • There are bindings in SDL.Raw to the enum, but they are the wrong type (Word32).
  • There are also lots of useful functions not bound (such as the ones to get the current state).

ramirez7 avatar Oct 15 '22 19:10 ramirez7