GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SDL_JoystickGetBall(3) SDL API Reference SDL_JoystickGetBall(3)

SDL_JoystickGetBall - Get relative trackball motion

#include "SDL.h"
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, &delta_x, &delta_y)==-1)
  printf("TrackBall Read Error!
");
printf("Trackball Delta- X:%d, Y:%d
", delta_x, delta_y);

SDL_JoystickNumBalls
Tue 11 Sep 2001, 23:00 SDL

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.