summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2016-10-03 04:02:54 -0700
committerGitHub <noreply@github.com>2016-10-03 04:02:54 -0700
commite38ddfd78768216b49b297423d4a4110798c029a (patch)
tree6fe3da63eca78b3905c3c5c2d5dd12302f35c978 /Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
parentb650552fb4bc3a545876723e176fcf5c8decbf52 (diff)
parent17e4bd9575281052f9aa27678c41e2e94e6c06e9 (diff)
Merge pull request #4111 from EmptyChaos/startup-perf-langs
InputCommon: Fix slow startup on some Windows systems with language packs (Issue 9744)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
index 92798a055c..9968bc798f 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -23,14 +23,11 @@ void InitJoystick(IDirectInput8* const idi8, HWND hwnd)
idi8->EnumDevices(DI8DEVCLASS_GAMECTRL, DIEnumDevicesCallback, (LPVOID)&joysticks,
DIEDFL_ATTACHEDONLY);
- std::vector<DWORD> xinput_guids;
- GetXInputGUIDS(&xinput_guids);
-
+ std::unordered_set<DWORD> xinput_guids = GetXInputGUIDS();
for (DIDEVICEINSTANCE& joystick : joysticks)
{
// skip XInput Devices
- if (std::find(xinput_guids.begin(), xinput_guids.end(), joystick.guidProduct.Data1) !=
- xinput_guids.end())
+ if (xinput_guids.count(joystick.guidProduct.Data1))
{
continue;
}