Skip to content

Latest commit

 

History

History
37 lines (37 loc) · 955 Bytes

SDL_JoystickGetBall.3

File metadata and controls

37 lines (37 loc) · 955 Bytes
 
Sep 14, 2001
Sep 14, 2001
1
.TH "SDL_JoystickGetBall" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference"
Apr 26, 2001
Apr 26, 2001
2
.SH "NAME"
Dec 29, 2007
Dec 29, 2007
3
SDL_JoystickGetBall \- Get relative trackball motion
Apr 26, 2001
Apr 26, 2001
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.SH "SYNOPSIS"
.PP
\fB#include "SDL\&.h"
.sp
\fBint \fBSDL_JoystickGetBall\fP\fR(\fBSDL_Joystick *joystick, int ball, int *dx, int *dy\fR);
.SH "DESCRIPTION"
.PP
Get the \fBball\fR axis change\&.
.PP
Trackballs can only return relative motion since the last call to \fBSDL_JoystickGetBall\fP, these motion deltas a placed into \fBdx\fR and \fBdy\fR\&.
.SH "RETURN VALUE"
.PP
Returns \fB0\fR on success or \fB-1\fR on failure
.SH "EXAMPLES"
.PP
.PP
.nf
\f(CWint 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);\fR
.fi
.PP
.SH "SEE ALSO"
.PP
\fI\fBSDL_JoystickNumBalls\fP\fR
Oct 10, 2009
Oct 10, 2009
37
.\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00