mirror of
https://github.com/glfw/glfw.git
synced 2025-12-20 14:11:55 +00:00
Compare commits
2 Commits
ae256034f6
...
741bce7677
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
741bce7677 | ||
|
|
c03f30d2af |
@ -522,7 +522,7 @@ void _glfwDetectJoystickConnectionWin32(void)
|
|||||||
if (XInputGetCapabilities(index, XINPUT_FLAG_GAMEPAD, &xic) != ERROR_SUCCESS)
|
if (XInputGetCapabilities(index, XINPUT_FLAG_GAMEPAD, &xic) != ERROR_SUCCESS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
GLFW_XINPUT_CAPABILITIES_EX xic_ex;
|
XINPUT_CAPABILITIES_EX xic_ex;
|
||||||
if (!XInputGetCapabilitiesEx || XInputGetCapabilitiesEx(1, index, 0, &xic_ex) != ERROR_SUCCESS)
|
if (!XInputGetCapabilitiesEx || XInputGetCapabilitiesEx(1, index, 0, &xic_ex) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
// use a generic VID/PID representing an XInput controller
|
// use a generic VID/PID representing an XInput controller
|
||||||
|
|||||||
@ -216,6 +216,7 @@ typedef enum
|
|||||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||||
|
|
||||||
|
#ifndef XINPUT_CAPABILITIES_EX
|
||||||
// this struct might not defined in XInput headers
|
// this struct might not defined in XInput headers
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -225,11 +226,12 @@ typedef struct
|
|||||||
WORD VersionNumber;
|
WORD VersionNumber;
|
||||||
WORD unk1;
|
WORD unk1;
|
||||||
DWORD unk2;
|
DWORD unk2;
|
||||||
} GLFW_XINPUT_CAPABILITIES_EX;
|
} XINPUT_CAPABILITIES_EX;
|
||||||
|
#endif
|
||||||
|
|
||||||
// xinput.dll function pointer typedefs
|
// xinput.dll function pointer typedefs
|
||||||
typedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
|
typedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
|
||||||
typedef DWORD (WINAPI * PFN_XInputGetCapabilitiesEx)(DWORD,DWORD,DWORD,GLFW_XINPUT_CAPABILITIES_EX*);
|
typedef DWORD (WINAPI * PFN_XInputGetCapabilitiesEx)(DWORD,DWORD,DWORD,XINPUT_CAPABILITIES_EX*);
|
||||||
typedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);
|
typedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);
|
||||||
#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities
|
#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities
|
||||||
#define XInputGetCapabilitiesEx _glfw.win32.xinput.GetCapabilitiesEx
|
#define XInputGetCapabilitiesEx _glfw.win32.xinput.GetCapabilitiesEx
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user