Penguin
Blame: SDL_JoystickGetAxis(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_JoystickGetAxis(3) version 2, including all changes. View license author blame.
Rev Author # Line
2 perry 1 SDL_!JoystickGetAxis
2 !!!SDL_!JoystickGetAxis
1 perry 3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 EXAMPLES
8 SEE ALSO
9 ----
10 !!NAME
11
12
2 perry 13 SDL_!JoystickGetAxis- Get the current state of an axis
1 perry 14 !!SYNOPSIS
15
16
17 __#include __
18
19
2 perry 20 __Sint16 SDL_!JoystickGetAxis__(__SDL_Joystick *joystick,
1 perry 21 int axis__);
22 !!DESCRIPTION
23
24
2 perry 25 __SDL_!JoystickGetAxis__ returns the current state of the
1 perry 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
2 perry 31 returned by __SDL_!JoystickGetAxis__ is a signed integer
1 perry 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 .
2 perry 49 x_move=SDL_!JoystickGetAxis(joy1, 0);
50 y_move=SDL_!JoystickGetAxis(joy1, 1);
1 perry 51 !!SEE ALSO
52
53
2 perry 54 __SDL_!JoystickNumAxes__
1 perry 55 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.