mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +00:00
Separated joystick state from window system state.
This is partially in preparation for pending support for additional joystick APIs like XInput, DirectInput and IOHID.
This commit is contained in:
+25
-11
@@ -27,19 +27,33 @@
|
||||
#ifndef _linux_joystick_h_
|
||||
#define _linux_joystick_h_
|
||||
|
||||
typedef struct _GLFWjoystickLinux {
|
||||
struct {
|
||||
int present;
|
||||
int fd;
|
||||
float* axes;
|
||||
int axisCount;
|
||||
unsigned char* buttons;
|
||||
int buttonCount;
|
||||
char* name;
|
||||
} joystick[GLFW_JOYSTICK_LAST + 1];
|
||||
#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \
|
||||
_GLFWjoystickLinux joystick[GLFW_JOYSTICK_LAST + 1]
|
||||
|
||||
|
||||
//========================================================================
|
||||
// GLFW platform specific types
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Platform-specific joystick structure
|
||||
//------------------------------------------------------------------------
|
||||
typedef struct _GLFWjoystickLinux
|
||||
{
|
||||
int present;
|
||||
int fd;
|
||||
float* axes;
|
||||
int axisCount;
|
||||
unsigned char* buttons;
|
||||
int buttonCount;
|
||||
char* name;
|
||||
} _GLFWjoystickLinux;
|
||||
|
||||
// Joystick input
|
||||
|
||||
//========================================================================
|
||||
// Prototypes for platform specific internal functions
|
||||
//========================================================================
|
||||
|
||||
void _glfwInitJoysticks(void);
|
||||
void _glfwTerminateJoysticks(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user