SDL_sysjoystick_c.h
Go to the documentation of this file.
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
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.
*/
#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 */
/* 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 */
Uint8 key_map[KEY_MAX];
Uint8 abs_map[ABS_MAX];
struct axis_correct
{
int used;
int coef[3];
} abs_correct[ABS_MAX];
int fresh;
/* Steam Controller support */
SDL_bool m_bSteamController;
};
/* vi: set ts=4 sw=4 expandtab: */
joystick_hwdata::fresh
int fresh
Definition: SDL_sysjoystick_c.h:54
joystick_hwdata::guid
SDL_JoystickGUID guid
Definition: SDL_sysjoystick_c.h:65
joystick_hwdata::abs_correct
struct joystick_hwdata::axis_correct abs_correct[ABS_MAX]
joystick_hwdata::key_map
Uint8 key_map[KEY_MAX]
Definition: SDL_sysjoystick_c.h:46
joystick_hwdata::fname
char * fname
Definition: SDL_sysjoystick_c.h:32
joystick_hwdata::hwdata_hat::axis
int axis[2]
Definition: SDL_sysjoystick_c.h:37
joystick_hwdata::abs_map
Uint8 abs_map[ABS_MAX]
Definition: SDL_sysjoystick_c.h:47
joystick_hwdata::axis_correct::used
int used
Definition: SDL_sysjoystick_c.h:50
joystick_hwdata::fd
int fd
Definition: SDL_sysjoystick_c.h:29
joystick_hwdata
Definition: SDL_sysjoystick_c.h:44
joystick_hwdata::hwdata_hat
Definition: SDL_sysjoystick_c.h:35
Uint8
uint8_t Uint8
Definition: SDL_stdinc.h:157
joystick_hwdata::hats
int hats
Definition: SDL_sysjoystick_c.h:55
joystick_hwdata::hwdata_ball
Definition: SDL_sysjoystick_c.h:40
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:139
joystick_hwdata::m_bSteamController
SDL_bool m_bSteamController
Definition: SDL_sysjoystick_c.h:49
joystick_hwdata::item
struct SDL_joylist_item * item
Definition: SDL_sysjoystick_c.h:30
SDL_JoystickGUID
Definition: SDL_joystick.h:70
joystick_hwdata::balls
struct joystick_hwdata::hwdata_ball * balls
joystick_hwdata::axis_correct
Definition: SDL_sysjoystick_c.h:48