[HID] Change order to xinput, sdl, winkey

This commit is contained in:
Joel Linn 2020-11-28 17:01:26 +01:00 committed by Rick Gibbed
parent 842ac86b1f
commit b30fcbd29a
1 changed files with 3 additions and 1 deletions

View File

@ -188,10 +188,12 @@ std::vector<std::unique_ptr<hid::InputDriver>> CreateInputDrivers(
Factory<hid::InputDriver, ui::Window*> factory;
#if XE_PLATFORM_WIN32
factory.Add("xinput", xe::hid::xinput::Create);
#endif // XE_PLATFORM_WIN32
factory.Add("sdl", xe::hid::sdl::Create);
#if XE_PLATFORM_WIN32
// WinKey input driver should always be the last input driver added!
factory.Add("winkey", xe::hid::winkey::Create);
#endif // XE_PLATFORM_WIN32
factory.Add("sdl", xe::hid::sdl::Create);
for (auto& driver : factory.CreateAll(cvars::hid, window)) {
if (XSUCCEEDED(driver->Setup())) {
drivers.emplace_back(std::move(driver));