Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
SDL_JoystickGetBall(3) | SDL API Reference | SDL_JoystickGetBall(3) |
NAME
SDL_JoystickGetBall - Get relative trackball motionSYNOPSIS
#include "SDL.h"DESCRIPTION
Get the ball axis change.RETURN VALUE
Returns 0 on success or -1 on failureEXAMPLES
int delta_x, delta_y;
SDL_Joystick *joy;
.
.
.
SDL_JoystickUpdate();
if(SDL_JoystickGetBall(joy, 0, &delta_x, &delta_y)==-1)
printf("TrackBall Read Error!
");
printf("Trackball Delta- X:%d, Y:%d
", delta_x, delta_y);
SEE ALSO
SDL_JoystickNumBallsTue 11 Sep 2001, 23:00 | SDL |