Cocoa: Clean up joystick globals

This commit is contained in:
Camilla Berglund
2016-06-07 14:11:54 +02:00
parent b6b8ff591d
commit 76801973e1
3 changed files with 33 additions and 39 deletions
+4 -11
View File
@@ -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);