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:
Camilla Berglund
2014-03-19 15:27:49 +01:00
parent 6acbfe863d
commit 660034332d
13 changed files with 214 additions and 114 deletions
+2 -9
View File
@@ -163,6 +163,8 @@ typedef HRESULT (WINAPI * DWMISCOMPOSITIONENABLED_T)(BOOL*);
#error "No supported context creation API selected"
#endif
#include "winmm_joystick.h"
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWin32 win32
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorWin32 win32
@@ -232,11 +234,6 @@ typedef struct _GLFWlibraryWin32
DWMISCOMPOSITIONENABLED_T DwmIsCompositionEnabled;
} dwmapi;
struct {
float axes[6];
unsigned char buttons[36]; // 32 buttons plus one hat
char* name;
} joystick[GLFW_JOYSTICK_LAST + 1];
} _GLFWlibraryWin32;
@@ -276,10 +273,6 @@ char* _glfwCreateUTF8FromWideString(const WCHAR* source);
// Time
void _glfwInitTimer(void);
// Joystick input
void _glfwInitJoysticks(void);
void _glfwTerminateJoysticks(void);
// Fullscreen support
GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired);
void _glfwRestoreVideoMode(_GLFWmonitor* monitor);