From cd17f1846fc22ece1f24620fc8cad0764dd574c7 Mon Sep 17 00:00:00 2001 From: beeanyew Date: Sun, 18 Sep 2022 15:18:29 +0200 Subject: [PATCH] [Input System] xe_mutex revert On request from chrisps, revert xe_mutex back to xe_unlikely_mutex to avoid mutex deadlocks while initializing hid-winkey. --- src/xenia/hid/input_system.cc | 4 ++-- src/xenia/hid/input_system.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenia/hid/input_system.cc b/src/xenia/hid/input_system.cc index a21ce5a7b..588faefe3 100644 --- a/src/xenia/hid/input_system.cc +++ b/src/xenia/hid/input_system.cc @@ -137,8 +137,8 @@ X_INPUT_VIBRATION InputSystem::ModifyVibrationLevel( modified_vibration.right_motor_speed = 0; return modified_vibration; } -std::unique_lock InputSystem::lock() { - return std::unique_lock{lock_}; +std::unique_lock InputSystem::lock() { + return std::unique_lock{lock_}; } } // namespace hid } // namespace xe diff --git a/src/xenia/hid/input_system.h b/src/xenia/hid/input_system.h index c294edc64..333116499 100644 --- a/src/xenia/hid/input_system.h +++ b/src/xenia/hid/input_system.h @@ -48,7 +48,7 @@ class InputSystem { void UpdateUsedSlot(uint8_t slot, bool connected); uint8_t GetConnectedSlots() const { return connected_slot; } - std::unique_lock lock(); + std::unique_lock lock(); private: xe::ui::Window* window_ = nullptr; @@ -57,7 +57,7 @@ class InputSystem { X_INPUT_VIBRATION ModifyVibrationLevel(X_INPUT_VIBRATION* vibration); uint8_t connected_slot = 0b0001; - xe_mutex lock_; + xe_unlikely_mutex lock_; }; } // namespace hid