This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

Draft

THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!

SDL_GameControllerGetAxis

Get the current state of an axis control on a game controller.

Syntax

extern DECLSPEC Sint16 SDLCALL
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);

Function Parameters

gamecontroller

a game controller

axis

an axis index (one of the SDL_GameControllerAxis values)

Return Value

Returns axis state (including 0) on success or 0 (also) on failure; call SDL_GetError() for more information.

Remarks

The axis indices start at index 0.

The state is a value ranging from -32768 to 32767. Triggers, however, range from 0 to 32767 (they never return a negative value).

Version

This function is available since SDL 2.0.0.

SDL_GameControllerGetButton

CategoryAPI, CategoryGameController, CategoryDraft


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.