mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Cocoa: Clean up joystick globals
This commit is contained in:
+4
-11
@@ -32,12 +32,13 @@
|
||||
#include <IOKit/hid/IOHIDLib.h>
|
||||
#include <IOKit/hid/IOHIDKeys.h>
|
||||
|
||||
#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE _GLFWjoystickNS ns_js
|
||||
#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \
|
||||
_GLFWjoystickNS ns_js[GLFW_JOYSTICK_LAST + 1]
|
||||
|
||||
|
||||
// Cocoa-specific per-joystick data
|
||||
//
|
||||
typedef struct _GLFWjoydeviceNS
|
||||
typedef struct _GLFWjoystickNS
|
||||
{
|
||||
GLFWbool present;
|
||||
char name[256];
|
||||
@@ -50,17 +51,9 @@ typedef struct _GLFWjoydeviceNS
|
||||
|
||||
float* axes;
|
||||
unsigned char* buttons;
|
||||
} _GLFWjoydeviceNS;
|
||||
|
||||
// Cocoa-specific joystick API data
|
||||
//
|
||||
typedef struct _GLFWjoystickNS
|
||||
{
|
||||
_GLFWjoydeviceNS js[GLFW_JOYSTICK_LAST + 1];
|
||||
|
||||
IOHIDManagerRef managerRef;
|
||||
} _GLFWjoystickNS;
|
||||
|
||||
|
||||
void _glfwInitJoysticksNS(void);
|
||||
void _glfwTerminateJoysticksNS(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user