diff --git a/src/xenia/app/emulator_window.cc b/src/xenia/app/emulator_window.cc index e820bb635..cf4f3118d 100644 --- a/src/xenia/app/emulator_window.cc +++ b/src/xenia/app/emulator_window.cc @@ -1833,7 +1833,8 @@ void EmulatorWindow::GamepadHotKeys() { for (uint32_t user_index = 0; user_index < XUserMaxUserCount; ++user_index) { - X_RESULT result = input_sys->GetState(user_index, &state); + X_RESULT result = input_sys->GetState( + user_index, X_INPUT_FLAG::X_INPUT_FLAG_GAMEPAD, &state); // Release the lock before processing the hotkey input_lock.mutex()->unlock(); diff --git a/src/xenia/hid/input_system.cc b/src/xenia/hid/input_system.cc index 6ac765521..4f0e678d9 100644 --- a/src/xenia/hid/input_system.cc +++ b/src/xenia/hid/input_system.cc @@ -104,13 +104,16 @@ X_RESULT InputSystem::GetCapabilities(uint32_t user_index, uint32_t flags, return X_ERROR_DEVICE_NOT_CONNECTED; } -X_RESULT InputSystem::GetState(uint32_t user_index, X_INPUT_STATE* out_state) { +X_RESULT InputSystem::GetState(uint32_t user_index, uint32_t flags, + X_INPUT_STATE* out_state) { SCOPE_profile_cpu_f("hid"); - for (auto& driver : drivers_) { + std::vector filtered_drivers = FilterDrivers(flags); + + for (auto& driver : filtered_drivers) { X_RESULT result = driver->GetState(user_index, out_state); if (result == X_ERROR_SUCCESS) { - UpdateUsedSlot(driver.get(), user_index, true); + UpdateUsedSlot(driver, user_index, true); AdjustDeadzoneLevels(user_index, &out_state->gamepad); if (out_state->gamepad.buttons != 0) { diff --git a/src/xenia/hid/input_system.h b/src/xenia/hid/input_system.h index 895e7a8cd..69b8710b9 100644 --- a/src/xenia/hid/input_system.h +++ b/src/xenia/hid/input_system.h @@ -40,7 +40,8 @@ class InputSystem { X_RESULT GetCapabilities(uint32_t user_index, uint32_t flags, X_INPUT_CAPABILITIES* out_caps); - X_RESULT GetState(uint32_t user_index, X_INPUT_STATE* out_state); + X_RESULT GetState(uint32_t user_index, uint32_t flags, + X_INPUT_STATE* out_state); X_RESULT SetState(uint32_t user_index, X_INPUT_VIBRATION* vibration); X_RESULT GetKeystroke(uint32_t user_index, uint32_t flags, X_INPUT_KEYSTROKE* out_keystroke); diff --git a/src/xenia/kernel/xam/xam_input.cc b/src/xenia/kernel/xam/xam_input.cc index 070dbd6c1..4a81ff7d1 100644 --- a/src/xenia/kernel/xam/xam_input.cc +++ b/src/xenia/kernel/xam/xam_input.cc @@ -118,7 +118,7 @@ dword_result_t XamInputGetState_entry(dword_t user_index, dword_t flags, auto input_system = kernel_state()->emulator()->input_system(); auto lock = input_system->lock(); - return input_system->GetState(user_index, input_state); + return input_system->GetState(user_index, flags, input_state); } DECLARE_XAM_EXPORT2(XamInputGetState, kInput, kImplemented, kHighFrequency);