diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-07-15 12:11:17 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-07-15 12:11:17 -0400 |
| commit | ebd029973a730d6a6d6653621a2565fbdc38e49d (patch) | |
| tree | d438e3232afcfb8b31f9324d87df7ebab759db29 /Source/Core/InputCommon/ControllerInterface/Device.cpp | |
| parent | 01cd90deef0ebeb1b8960dbdb2952d143f34a60a (diff) | |
| parent | ff918df88991710d58d983aa2e5dbcf03f2064ab (diff) | |
Merge pull request #604 from magcius/wip/emu-cleanup-2
Start cleaning up the input interface
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Device.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.cpp b/Source/Core/InputCommon/ControllerInterface/Device.cpp index e1383efc9d..61057c8162 100644 --- a/Source/Core/InputCommon/ControllerInterface/Device.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Device.cpp @@ -5,6 +5,12 @@ #include <sstream> #include <string> +// For InputGateOn() +// This is a really bad layering violation, but it's the cleanest +// place I could find to put it. +#include "Core/ConfigManager.h" +#include "Core/Host.h" + #include "InputCommon/ControllerInterface/Device.h" namespace ciface @@ -74,6 +80,16 @@ void Device::ClearInputState() // kinda slow but, w/e, should only happen when user unplugs a device while playing } +bool Device::Control::InputGateOn() +{ + if (SConfig::GetInstance().m_BackgroundInput) + return true; + else if (Host_RendererHasFocus()) + return true; + else + return false; +} + // // DeviceQualifier :: ToString // |
