-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update GLFW to 3.4 - Update SDL2 to 2.30.0 - Add a patch to build SDL2 on MinGW - Install two new developement packages to build GLFW on Linux with GitHub Actions
- Loading branch information
Showing
5 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
diff -urN SDL2-2.0.22.orig/src/joystick/windows/SDL_windows_gaming_input.c SDL2-2.0.22/src/joystick/windows/SDL_windows_gaming_input.c | ||
--- SDL2-2.0.22.orig/src/joystick/windows/SDL_windows_gaming_input.c 2022-04-21 19:37:37.000000000 +0200 | ||
+++ SDL2-2.0.22/src/joystick/windows/SDL_windows_gaming_input.c 2022-06-29 01:55:50.226260405 +0200 | ||
@@ -34,6 +34,13 @@ | ||
#include <cfgmgr32.h> | ||
#include <roapi.h> | ||
|
||
+#ifdef ____FIReference_1_INT32_INTERFACE_DEFINED__ | ||
+/* MinGW-64 uses __FIReference_1_INT32 instead of Microsoft's __FIReference_1_int */ | ||
+#define __FIReference_1_int __FIReference_1_INT32 | ||
+#define __FIReference_1_int_get_Value __FIReference_1_INT32_get_Value | ||
+#define __FIReference_1_int_Release __FIReference_1_INT32_Release | ||
+#endif | ||
+ | ||
|
||
struct joystick_hwdata | ||
{ | ||
diff --git a/src/core/windows/SDL_xinput.h b/src/core/windows/SDL_xinput.h | ||
index 85e97ff..c5b2b70 100644 | ||
--- a/src/core/windows/SDL_xinput.h | ||
+++ b/src/core/windows/SDL_xinput.h | ||
@@ -211,17 +211,6 @@ typedef struct | ||
|
||
#endif /* HAVE_XINPUT_H */ | ||
|
||
-/* This struct is not defined in XInput headers. */ | ||
-typedef struct _XINPUT_CAPABILITIES_EX | ||
-{ | ||
- XINPUT_CAPABILITIES Capabilities; | ||
- WORD VendorId; | ||
- WORD ProductId; | ||
- WORD ProductVersion; | ||
- WORD unk1; | ||
- DWORD unk2; | ||
-} XINPUT_CAPABILITIES_EX, *PXINPUT_CAPABILITIES_EX; | ||
- | ||
/* Forward decl's for XInput API's we load dynamically and use if available */ | ||
typedef DWORD(WINAPI *XInputGetState_t)( | ||
DWORD dwUserIndex, /* [in] Index of the gamer associated with the device */ | ||
diff --git a/src/joystick/windows/SDL_xinputjoystick.c b/src/joystick/windows/SDL_xinputjoystick.c | ||
index 44d3457..d5bafd9 100644 | ||
--- a/src/joystick/windows/SDL_xinputjoystick.c | ||
+++ b/src/joystick/windows/SDL_xinputjoystick.c | ||
@@ -113,7 +113,7 @@ static SDL_bool GetXInputDeviceInfo(Uint8 userid, Uint16 *pVID, Uint16 *pPID, Ui | ||
*pPID = capabilities.ProductId; | ||
} | ||
if (pVersion) { | ||
- *pVersion = capabilities.ProductVersion; | ||
+ *pVersion = capabilities.VersionNumber; | ||
} | ||
return SDL_TRUE; | ||
} |