XInputSource: Reload devices on initialize

This commit is contained in:
Connor McLaughlin 2022-11-03 13:12:55 +10:00
parent 97ff2bf000
commit 5614887678
2 changed files with 4 additions and 3 deletions

View file

@ -115,6 +115,7 @@ bool XInputSource::Initialize(SettingsInterface& si, std::unique_lock<std::mutex
return false;
}
ReloadDevices();
return true;
}

View file

@ -68,9 +68,9 @@ private:
ControllerDataArray m_controllers;
HMODULE m_xinput_module{};
DWORD(WINAPI* m_xinput_get_state)(DWORD, XINPUT_STATE*);
DWORD(WINAPI* m_xinput_set_state)(DWORD, XINPUT_VIBRATION*);
DWORD(WINAPI* m_xinput_get_capabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*);
DWORD(WINAPI* m_xinput_get_state)(DWORD, XINPUT_STATE*) = nullptr;
DWORD(WINAPI* m_xinput_set_state)(DWORD, XINPUT_VIBRATION*) = nullptr;
DWORD(WINAPI* m_xinput_get_capabilities)(DWORD, DWORD, XINPUT_CAPABILITIES*) = nullptr;
static const char* s_axis_names[NUM_AXES];
static const char* s_button_names[NUM_BUTTONS];