InputCommon: Fix slow startup on some Windows systems

Rewrite GetXInputGUIDS to use SetupAPI instead of WMI Queries. When
using a language pack where the system language and user/program
language differ, Windows starts taking a VERY long time (10+ seconds)
to complete Queries for Win32_PNPEntity objects (it's probably
translating every single string since it transfers every single one
from the WMI server into memory in the program).

Fixes Issue 9744.
This commit is contained in:
EmptyChaos
2016-08-10 23:30:36 +00:00
parent 8552ff5789
commit 17e4bd9575
4 changed files with 64 additions and 124 deletions

View File

@ -41,14 +41,7 @@
<ClCompile Include="ControllerInterface\DInput\DInput.cpp" />
<ClCompile Include="ControllerInterface\DInput\DInputJoystick.cpp" />
<ClCompile Include="ControllerInterface\DInput\DInputKeyboardMouse.cpp" />
<ClCompile Include="ControllerInterface\DInput\XInputFilter.cpp">
<!--Disable /Zc:strictStrings so that wbem headers may compile-->
<!--
This is somewhat gross as it doesn't dynamically remove the option,
I really hope the issue is fixed in next VS release :(
-->
<AdditionalOptions>/Zo /Zc:inline /Zc:rvalueCast /volatile:iso</AdditionalOptions>
</ClCompile>
<ClCompile Include="ControllerInterface\DInput\XInputFilter.cpp" />
<ClCompile Include="ControllerInterface\ExpressionParser.cpp" />
<ClCompile Include="ControllerInterface\ForceFeedback\ForceFeedbackDevice.cpp" />
<ClCompile Include="ControllerInterface\XInput\XInput.cpp" />