From add52d48cdd194c8b2d89fc486bd0eb13e8ee0d7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 15 Jul 2015 14:44:37 +0200 Subject: [PATCH] - fixed: INPUT_XInput must also be available when compiling without XInput support so that the corresponding JoyDevice can be accessed. --- src/win32/i_input.h | 17 +++++++++-------- src/win32/i_xinput.cpp | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/win32/i_input.h b/src/win32/i_input.h index b0d409844d..c0de97e63b 100644 --- a/src/win32/i_input.h +++ b/src/win32/i_input.h @@ -47,6 +47,15 @@ FString I_GetFromClipboard (bool windows_has_no_selection_clipboard); void I_GetEvent(); +enum +{ + INPUT_DIJoy, + INPUT_XInput, + INPUT_RawPS2, + NUM_JOYDEVICES +}; + + #ifdef USE_WINDOWS_DWORD #include "m_joy.h" @@ -121,14 +130,6 @@ public: virtual IJoystickConfig *Rescan() = 0; }; -enum -{ - INPUT_DIJoy, - INPUT_XInput, - INPUT_RawPS2, - NUM_JOYDEVICES -}; - extern FJoystickCollection *JoyDevices[NUM_JOYDEVICES]; void I_StartupMouse(); diff --git a/src/win32/i_xinput.cpp b/src/win32/i_xinput.cpp index 5a02d7af4b..3d85f48a0d 100644 --- a/src/win32/i_xinput.cpp +++ b/src/win32/i_xinput.cpp @@ -789,6 +789,8 @@ void I_StartupXInput() #else // NO_XINPUT +#include "i_input.h" + void I_StartupXInput() { JoyDevices[INPUT_XInput] = NULL;