XInput: Do not use XINPUT_CAPS_FFB_SUPPORTED

There are several reasons for this:
1. XINPUT_CAPS_FFB_SUPPORTED flag was introduced in Windows 8,
   and therefore only supported by XInput 1.4
2. Despite the name, this flag does NOT indicate whether normal rumble
   is supported. This flag is reserved for more complex force feedback,
   and according to MSDN it may have went unused on Windows.

This fixes a future (the method is not used yet) bug where
XInputControllerInterface::GetControllerRumbleMotorCount would
erroreously report no rumble support.
This commit is contained in:
Silent
2020-08-22 22:46:12 +02:00
parent 136a9d60e9
commit 1c4bbc8cde
2 changed files with 2 additions and 19 deletions

View File

@ -60,7 +60,6 @@ private:
{
XINPUT_STATE last_state = {};
bool connected = false;
bool supports_rumble = false;
// Scaling value of 1.30f to 1.40f recommended when using recent controllers
float axis_scale = 1.00f;
@ -74,7 +73,6 @@ private:
using ControllerDataArray = std::array<ControllerData, XUSER_MAX_COUNT>;
void CheckForStateChanges(u32 index, const XINPUT_STATE& new_state);
void UpdateCapabilities(u32 index);
bool HandleAxisEvent(u32 index, Axis axis, s32 value);
bool HandleButtonEvent(u32 index, u32 button, bool pressed);
@ -82,7 +80,6 @@ private:
HMODULE m_xinput_module{};
DWORD(WINAPI* m_xinput_get_state)(DWORD, XINPUT_STATE*);
DWORD(WINAPI* m_xinput_get_capabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*);
DWORD(WINAPI* m_xinput_set_state)(DWORD, XINPUT_VIBRATION*);
std::mutex m_event_intercept_mutex;
Hook::Callback m_event_intercept_callback;