#pragma section-numbers off #pragma camelcase off || DRAFT|| ##*^*^*^*^*See http://wiki.libsdl.org/moin.cgi/SGFunctions for details on editing this page*^*^*^*^* = SDL_GameControllerGetAxis = Use this function to get the current state of an axis control on a game controller. <> == Syntax == {{{#!highlight cpp Sint16 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. == Code Examples == {{{#!highlight cpp You can add your code example here }}} ##Leave this section as-is unless you have a code example to put in. In that case, replace You can add your code example here with your code example following the Style Guide instructions. Leave the rest of the markup alone and delete this comment. == 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. == Related Functions == .[[SDL_GameControllerGetButton]] ---- [[CategoryAPI]], [[CategoryGameController]] ##See the Style Guide for instructions on editing the footer.