sdlGameControllerHasAxis function
Query whether a game controller has a given axis.
This merely reports whether the controller's mapping defined this axis, as that is all the information SDL has about the physical device.
\param gamecontroller a game controller \param axis an axis enum value (an SDL_GameControllerAxis value) \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
\since This function is available since SDL 2.0.14.
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
Implementation
bool sdlGameControllerHasAxis(
Pointer<SdlGameController> gamecontroller, int axis) {
final sdlGameControllerHasAxisLookupFunction = libSdl2.lookupFunction<
Int32 Function(Pointer<SdlGameController> gamecontroller, Int32 axis),
int Function(Pointer<SdlGameController> gamecontroller,
int axis)>('SDL_GameControllerHasAxis');
return sdlGameControllerHasAxisLookupFunction(gamecontroller, axis) == 1;
}