mirror of
https://github.com/glfw/glfw.git
synced 2025-12-20 14:11:55 +00:00
Compare commits
2 Commits
741bce7677
...
ae256034f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae256034f6 | ||
|
|
52243c2ff4 |
@ -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;
|
||||||
|
|
||||||
XINPUT_CAPABILITIES_EX xic_ex;
|
GLFW_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,7 +216,6 @@ 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
|
||||||
{
|
{
|
||||||
@ -226,12 +225,11 @@ typedef struct
|
|||||||
WORD VersionNumber;
|
WORD VersionNumber;
|
||||||
WORD unk1;
|
WORD unk1;
|
||||||
DWORD unk2;
|
DWORD unk2;
|
||||||
} XINPUT_CAPABILITIES_EX;
|
} GLFW_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,XINPUT_CAPABILITIES_EX*);
|
typedef DWORD (WINAPI * PFN_XInputGetCapabilitiesEx)(DWORD,DWORD,DWORD,GLFW_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