Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 2.24 KB

SDL_sysjoystick_c.h

File metadata and controls

79 lines (63 loc) · 2.24 KB
 
1
2
/*
Simple DirectMedia Layer
Jan 17, 2020
Jan 17, 2020
3
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
Oct 28, 2018
Oct 28, 2018
22
23
24
#ifndef SDL_sysjoystick_c_h_
#define SDL_sysjoystick_c_h_
25
26
27
28
29
30
31
32
33
34
35
36
#include <linux/input.h>
struct SDL_joylist_item;
/* The private structure used to keep track of a joystick */
struct joystick_hwdata
{
int fd;
struct SDL_joylist_item *item;
SDL_JoystickGUID guid;
char *fname; /* Used in haptic subsystem */
Aug 9, 2018
Aug 9, 2018
37
38
39
SDL_bool ff_rumble;
SDL_bool ff_sine;
struct ff_effect effect;
Jan 23, 2020
Jan 23, 2020
40
Uint32 effect_expiration;
Aug 9, 2018
Aug 9, 2018
41
42
43
44
45
46
47
48
49
50
51
52
53
/* The current Linux joystick driver maps hats to two axes */
struct hwdata_hat
{
int axis[2];
} *hats;
/* The current Linux joystick driver maps balls to two axes */
struct hwdata_ball
{
int axis[2];
} *balls;
/* Support for the Linux 2.4 unified input interface */
Nov 23, 2016
Nov 23, 2016
54
Uint8 key_map[KEY_MAX];
55
Uint8 abs_map[ABS_MAX];
May 29, 2020
May 29, 2020
56
57
58
SDL_bool has_key[KEY_MAX];
SDL_bool has_abs[ABS_MAX];
59
60
61
62
63
64
65
struct axis_correct
{
int used;
int coef[3];
} abs_correct[ABS_MAX];
int fresh;
Sep 22, 2017
Sep 22, 2017
66
67
68
/* Steam Controller support */
SDL_bool m_bSteamController;
Jun 12, 2019
Jun 12, 2019
69
70
/* 4 = (ABS_HAT3X-ABS_HAT0X)/2 (see input-event-codes.h in kernel) */
int hats_indices[4];
May 29, 2020
May 29, 2020
71
SDL_bool has_hat[4];
Jun 25, 2019
Jun 25, 2019
72
73
74
/* Set when gamepad is pending removal due to ENODEV read error */
SDL_bool gone;
Oct 28, 2018
Oct 28, 2018
77
78
#endif /* SDL_sysjoystick_c_h_ */
79
/* vi: set ts=4 sw=4 expandtab: */