Annotated edit history of
SDL_JoystickGetAxis(3) version 2 showing authors affecting page license.
View with all changes included.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SDL_!JoystickGetAxis |
|
|
2 |
!!!SDL_!JoystickGetAxis |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
EXAMPLES |
|
|
8 |
SEE ALSO |
|
|
9 |
---- |
|
|
10 |
!!NAME |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
SDL_!JoystickGetAxis- Get the current state of an axis |
|
|
14 |
!!SYNOPSIS |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
__#include __ |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__Sint16 SDL_!JoystickGetAxis__(__SDL_Joystick *joystick, |
|
|
21 |
int axis__); |
|
|
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
__SDL_!JoystickGetAxis__ returns the current state of the |
|
|
26 |
given __axis__ on the given __joystick__. |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
On most modern joysticks the X axis is usually represented |
|
|
30 |
by __axis__ 0 and the Y axis by __axis__ 1. The value |
|
|
31 |
returned by __SDL_!JoystickGetAxis__ is a signed integer |
|
|
32 |
(-32768 to 32768) representing the current position of the |
|
|
33 |
__axis__, it maybe necessary to impose certain tolerances |
|
|
34 |
on these values to account for jitter. It is worth noting |
|
|
35 |
that some joysticks use axes 2 and 3 for extra |
|
|
36 |
buttons. |
|
|
37 |
!!RETURN VALUE |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
Returns a 16-bit signed integer representing the current |
|
|
41 |
position of the __axis__. |
|
|
42 |
!!EXAMPLES |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
Sint16 x_move, y_move; |
|
|
46 |
SDL_Joystick *joy1; |
|
|
47 |
. |
|
|
48 |
. |
|
|
49 |
x_move=SDL_!JoystickGetAxis(joy1, 0); |
|
|
50 |
y_move=SDL_!JoystickGetAxis(joy1, 1); |
|
|
51 |
!!SEE ALSO |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
__SDL_!JoystickNumAxes__ |
|
|
55 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.