diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2013-01-17 15:40:44 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2013-01-17 15:40:44 -0600 |
| commit | 38b01d176a266ac67e2473f16c645760a991fb66 (patch) | |
| tree | 677dd77b75e7979b0c7d7954cbb82249277d0bc5 /Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp | |
| parent | 69c91a20ea77bad0a9a1e10ab963c580908c3a45 (diff) | |
Start to make possible use of "full analog surface". (useful for triggers on some silly physical gamepads)
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp | 4 |
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; |
