sdlGameControllerGetBindForAxis function
SdlGameControllerButtonBind
sdlGameControllerGetBindForAxis(
- Pointer<
SdlGameController> gamecontroller, - int axis
Get the SDL joystick layer binding for a controller axis mapping.
\param gamecontroller a game controller
\param axis an axis enum value (one of the SDL_GameControllerAxis values)
\returns a SDL_GameControllerButtonBind describing the bind. On failure
(like the given Controller axis doesn't exist on the device), its
.bindType
will be SDL_CONTROLLER_BINDTYPE_NONE
.
\since This function is available since SDL 2.0.0.
\sa SDL_GameControllerGetBindForButton
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)
Implementation
SdlGameControllerButtonBind sdlGameControllerGetBindForAxis(
Pointer<SdlGameController> gamecontroller, int axis) {
final sdlGameControllerGetBindForAxisLookupFunction = libSdl2.lookupFunction<
SdlGameControllerButtonBind Function(
Pointer<SdlGameController> gamecontroller, Int32 axis),
SdlGameControllerButtonBind Function(
Pointer<SdlGameController> gamecontroller,
int axis)>('SDL_GameControllerGetBindForAxis');
return sdlGameControllerGetBindForAxisLookupFunction(gamecontroller, axis);
}