summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-11-13 00:10:02 -0800
committerJasper St. Pierre <jstpierre@mecheye.net>2014-11-28 10:50:45 -0800
commitb5d4e8d37ec240632c7be40d6f670da10d9de2a4 (patch)
treee3bc1eda52766d24074005c38f1439e1f999d755 /Source/Core/InputCommon
parent6aa1a59ee8e857dc1a1f94e34b8b949eda1eaba1 (diff)
ControllerInterface: Remove unused "force" parameter
I'm not sure when this nonsense of forcing locking the mutex when it's already taken should have ever taken effect, but let's be thankful it isn't now. That was a badly worded sentence.
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp12
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ControllerInterface.h4
2 files changed, 6 insertions, 10 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;
diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
index 2420b65ed7..56723b123f 100644
--- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
+++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h
@@ -120,8 +120,8 @@ public:
bool IsInit() const { return m_is_init; }
void UpdateReference(ControlReference* control, const ciface::Core::DeviceQualifier& default_device) const;
- bool UpdateInput(const bool force = false);
- bool UpdateOutput(const bool force = false);
+ bool UpdateInput();
+ bool UpdateOutput();
std::recursive_mutex update_lock;