www.fifi.org Documentation Manpages GNU Info Debian document tree Whole document tree Trigance web page Public services User info Mailing lists Secure server Multilingual usage
Copyright (C) 2000-2012 Philippe Troin <webmaster@fifi.org>.
Validate HTML Validate CSS
Whole document tree
#include "SDL.h"
int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
int SDL_JoystickGetBall
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, &delta_x, &delta_y)==-1) printf("TrackBall Read Error!\n"); printf("Trackball Delta- X:%d, Y:%d\n", delta_x, delta_y);
SDL_JoystickNumBalls