Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SDL_JoystickGetAxis(3)
Edit
PageHistory
Diff
Info
LikePages
SDL_!JoystickGetAxis !!!SDL_!JoystickGetAxis NAME SYNOPSIS DESCRIPTION RETURN VALUE EXAMPLES SEE ALSO ---- !!NAME SDL_!JoystickGetAxis- Get the current state of an axis !!SYNOPSIS __#include __ __Sint16 SDL_!JoystickGetAxis__(__SDL_Joystick *joystick, int axis__); !!DESCRIPTION __SDL_!JoystickGetAxis__ returns the current state of the given __axis__ on the given __joystick__. On most modern joysticks the X axis is usually represented by __axis__ 0 and the Y axis by __axis__ 1. The value returned by __SDL_!JoystickGetAxis__ is a signed integer (-32768 to 32768) representing the current position of the __axis__, it maybe necessary to impose certain tolerances on these values to account for jitter. It is worth noting that some joysticks use axes 2 and 3 for extra buttons. !!RETURN VALUE Returns a 16-bit signed integer representing the current position of the __axis__. !!EXAMPLES Sint16 x_move, y_move; SDL_Joystick *joy1; . . x_move=SDL_!JoystickGetAxis(joy1, 0); y_move=SDL_!JoystickGetAxis(joy1, 1); !!SEE ALSO __SDL_!JoystickNumAxes__ ----
One page links to
SDL_JoystickGetAxis(3)
:
SDLManPages
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.