SDL_!JoystickGetBall
NAME SYNOPSIS DESCRIPTION RETURN VALUE EXAMPLES SEE ALSO
SDL_!JoystickGetBall- Get relative trackball motion
#include
int SDL_!JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
Get the ball axis change.
Trackballs can only return relative motion since the last call to SDL_!JoystickGetBall, these motion deltas a placed into dx and dy.
Returns 0 on success or -1 on failure
int delta_x, delta_y; SDL_Joystick *joy; . . . SDL_!JoystickUpdate(); if(SDL_!JoystickGetBall(joy, 0,
SDL_!JoystickNumBalls
One page links to SDL_JoystickGetBall(3):