diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index e75df76a36..ddfde30118 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -135,13 +135,11 @@ void ControllerInterface::Shutdown() // // Update input for all devices, return true if all devices returned successful // -bool ControllerInterface::UpdateInput(const bool force) +bool ControllerInterface::UpdateInput() { std::unique_lock<std::recursive_mutex> lk(update_lock, std::defer_lock); - if (force) - lk.lock(); - else if (!lk.try_lock()) + if (!lk.try_lock()) return false; size_t ok_count = 0; @@ -163,13 +161,11 @@ bool ControllerInterface::UpdateInput(const bool force) // // Update output for all devices, return true if all devices returned successful // -bool ControllerInterface::UpdateOutput(const bool force) +bool ControllerInterface::UpdateOutput() { std::unique_lock<std::recursive_mutex> lk(update_lock, std::defer_lock); - if (force) - lk.lock(); - else if (!lk.try_lock()) + if (!lk.try_lock()) return false; size_t ok_count = 0; |
