Add initial XInput support

This commit is contained in:
Camilla Berglund
2014-08-15 15:08:09 +02:00
parent 9f1474c1d0
commit eb3577c1eb
5 changed files with 323 additions and 121 deletions
+7 -2
View File
@@ -30,18 +30,23 @@
#define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \
_GLFWjoystickWin32 win32_js[GLFW_JOYSTICK_LAST + 1]
// Win32-specific per-joystick data
//
typedef struct _GLFWjoystickWin32
{
GLFWbool present;
float axes[6];
unsigned char buttons[36]; // 32 buttons plus one hat
int axisCount;
unsigned char buttons[14];
int buttonCount;
char* name;
DWORD index;
} _GLFWjoystickWin32;
void _glfwInitJoysticksWin32(void);
void _glfwTerminateJoysticksWin32(void);
void _glfwDetectJoystickConnectionWin32(void);
void _glfwDetectJoystickDisconnectionWin32(void);
#endif // _glfw3_win32_joystick_h_