Patched to compile on MingW. (I think!)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c
index 476ee98..8853759 100644
--- a/src/joystick/windows/SDL_dinputjoystick.c
+++ b/src/joystick/windows/SDL_dinputjoystick.c
@@ -20,9 +20,10 @@
*/
#include "../../SDL_internal.h"
+#include "../SDL_sysjoystick.h"
+
#if SDL_JOYSTICK_DINPUT
-#include "../SDL_sysjoystick.h"
#include "SDL_windowsjoystick_c.h"
#include "SDL_dinputjoystick_c.h"
#include "SDL_xinputjoystick_c.h"
@@ -866,6 +867,7 @@ SDL_DINPUT_JoystickQuit(void)
#else /* !SDL_JOYSTICK_DINPUT */
+struct JoyStick_DeviceData;
int
SDL_DINPUT_JoystickInit(void)
diff --git a/src/joystick/windows/SDL_xinputjoystick.c b/src/joystick/windows/SDL_xinputjoystick.c
index 9042d57..d29bc28 100644
--- a/src/joystick/windows/SDL_xinputjoystick.c
+++ b/src/joystick/windows/SDL_xinputjoystick.c
@@ -20,11 +20,12 @@
*/
#include "../../SDL_internal.h"
+#include "../SDL_sysjoystick.h"
+
#if SDL_JOYSTICK_XINPUT
#include "SDL_assert.h"
#include "SDL_hints.h"
-#include "../SDL_sysjoystick.h"
#include "SDL_windowsjoystick_c.h"
#include "SDL_xinputjoystick_c.h"
@@ -338,6 +339,7 @@ SDL_SYS_IsXInputGamepad_DeviceIndex(int device_index)
#else /* !SDL_JOYSTICK_XINPUT */
+struct JoyStick_DeviceData;
SDL_bool SDL_XINPUT_Enabled(void)
{