![]() |
naev 0.12.6
|
Handles joystick initialization. More...
#include "joystick.h"#include "log.h"
Go to the source code of this file.
Functions | |
| static void | joystick_initHaptic (void) |
| Initializes force feedback for the loaded device. | |
| int | joystick_get (const char *namjoystick) |
| Gets the joystick index by name. | |
| int | joystick_use (int indjoystick) |
| Makes the game use a joystick by index. | |
| int | joystick_init (void) |
| Initializes the joystick subsystem. | |
| void | joystick_exit (void) |
| Exits the joystick subsystem. | |
Variables | |
| static SDL_Joystick * | joystick = NULL |
| static int | has_haptic = 0 |
| SDL_Haptic * | haptic = NULL |
| unsigned int | haptic_query = 0 |
Handles joystick initialization.
Definition in file joystick.c.
| void joystick_exit | ( | void | ) |
Exits the joystick subsystem.
Definition at line 171 of file joystick.c.
| int joystick_get | ( | const char * | namjoystick | ) |
Gets the joystick index by name.
| namjoystick | Looks for this string in the joystick name. |
Definition at line 35 of file joystick.c.
| int joystick_init | ( | void | ) |
|
static |
Initializes force feedback for the loaded device.
Definition at line 96 of file joystick.c.
| int joystick_use | ( | int | indjoystick | ) |
Makes the game use a joystick by index.
| indjoystick | Index of the joystick to use. |
Definition at line 54 of file joystick.c.
| SDL_Haptic* haptic = NULL |
Current haptic in use, externed in spfx.c.
Definition at line 21 of file joystick.c.
| unsigned int haptic_query = 0 |
Properties of the haptic device.
Definition at line 22 of file joystick.c.
|
static |
Does the player have haptic?
Definition at line 20 of file joystick.c.
|
static |
Current joystick in use.
Definition at line 19 of file joystick.c.