summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-01-17 15:48:50 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-01-17 15:48:50 -0600
commita01bd96d7d0bde0125ad3b13a6e6f6353fe1c8a0 (patch)
treebfea2306c8379113f675ab920357f459db934ac2 /Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
parent69c91a20ea77bad0a9a1e10ab963c580908c3a45 (diff)
parentf97d2a93c4167a4b6aec0ae69536395380d427e3 (diff)
Merge branch 'full-analog-surface'
Fixes issue 5010.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
index 82cfe2469e..e6877f5731 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
@@ -461,7 +461,7 @@ ControllerInterface::Device::Control* ControllerInterface::InputReference::Detec
i = device->Inputs().begin(),
e = device->Inputs().end();
for (std::vector<bool>::iterator state = states.begin(); i != e; ++i)
- *state++ = ((*i)->GetState() > INPUT_DETECT_THRESHOLD);
+ *state++ = ((*i)->GetState() > (1 - INPUT_DETECT_THRESHOLD));
while (time < ms)
{
@@ -477,7 +477,7 @@ ControllerInterface::Device::Control* ControllerInterface::InputReference::Detec
if (false == *state)
return *i;
}
- else
+ else if ((*i)->GetState() < (1 - INPUT_DETECT_THRESHOLD))
*state = false;
}
Common::SleepCurrentThread(10); time += 10;