mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
committed by
Camilla Löwy
parent
78666204a1
commit
d1a2ec4d20
+12
-5
@@ -24,27 +24,34 @@
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include <linux/input.h>
|
||||
#include <linux/limits.h>
|
||||
#include <regex.h>
|
||||
|
||||
#define _GLFW_PLATFORM_JOYSTICK_STATE _GLFWjoystickLinux linjs
|
||||
#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWlibraryLinux linjs
|
||||
|
||||
#define HATS_MAX ((ABS_HAT3Y - ABS_HAT0X) / 2)
|
||||
|
||||
// Linux-specific joystick data
|
||||
//
|
||||
typedef struct _GLFWjoystickLinux
|
||||
{
|
||||
int fd;
|
||||
char* path;
|
||||
int fd;
|
||||
char path[PATH_MAX];
|
||||
int keyMap[KEY_MAX];
|
||||
int absMap[ABS_MAX];
|
||||
struct input_absinfo absInfo[ABS_MAX];
|
||||
int hats[HATS_MAX][2];
|
||||
} _GLFWjoystickLinux;
|
||||
|
||||
// Linux-specific joystick API data
|
||||
//
|
||||
typedef struct _GLFWlibraryLinux
|
||||
{
|
||||
int inotify;
|
||||
int watch;
|
||||
regex_t regex;
|
||||
int inotify;
|
||||
int watch;
|
||||
regex_t regex;
|
||||
} _GLFWlibraryLinux;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user