4 >SDL_JoystickGetBall</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="SDL Library Documentation"
11 HREF="index.html"><LINK
14 HREF="joystick.html"><LINK
16 TITLE="SDL_JoystickGetButton"
17 HREF="sdljoystickgetbutton.html"><LINK
19 TITLE="SDL_JoystickClose"
20 HREF="sdljoystickclose.html"></HEAD
31 SUMMARY="Header navigation table"
40 >SDL Library Documentation</TH
48 HREF="sdljoystickgetbutton.html"
62 HREF="sdljoystickclose.html"
73 NAME="SDLJOYSTICKGETBALL"
75 >SDL_JoystickGetBall</H1
83 >SDL_JoystickGetBall -- Get relative trackball motion</DIV
85 CLASS="REFSYNOPSISDIV"
99 CLASS="FUNCSYNOPSISINFO"
100 >#include "SDL.h"</PRE
107 >SDL_JoystickGetBall</B
109 >(SDL_Joystick *joystick, int ball, int *dx, int *dy);</CODE
130 >Trackballs can only return relative motion since the last call to <TT
132 >SDL_JoystickGetBall</TT
133 >, these motion deltas a placed into <TT
156 > on success or <SPAN
170 CLASS="PROGRAMLISTING"
171 >int delta_x, delta_y;
176 SDL_JoystickUpdate();
177 if(SDL_JoystickGetBall(joy, 0, &delta_x, &delta_y)==-1)
178 printf("TrackBall Read Error!\n");
179 printf("Trackball Delta- X:%d, Y:%d\n", delta_x, delta_y);</PRE
191 HREF="sdljoysticknumballs.html"
194 >SDL_JoystickNumBalls</TT
203 SUMMARY="Footer navigation table"
214 HREF="sdljoystickgetbutton.html"
232 HREF="sdljoystickclose.html"
242 >SDL_JoystickGetButton</TD
256 >SDL_JoystickClose</TD