From 38b01d176a266ac67e2473f16c645760a991fb66 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Thu, 17 Jan 2013 15:40:44 -0600 Subject: Start to make possible use of "full analog surface". (useful for triggers on some silly physical gamepads) --- .../Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp') 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::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; -- cgit v1.2.3 From 2f28d938cf640390cd8979c6104f3dbe8795e1e6 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Thu, 17 Jan 2013 23:32:07 -0800 Subject: Add support for the mouse cursor and mouse clicking events on OS X. --- Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index e6877f5731..8e96231674 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -45,7 +45,7 @@ void ControllerInterface::Initialize() ciface::Xlib::Init(m_devices, m_hwnd); #endif #ifdef CIFACE_USE_OSX - ciface::OSX::Init(m_devices); + ciface::OSX::Init(m_devices, m_hwnd); #endif #ifdef CIFACE_USE_SDL ciface::SDL::Init(m_devices); -- cgit v1.2.3