summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-07-11 10:42:44 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-07-11 13:38:37 -0400
commit5abc028ace035479e46d545bf8231db5531a3d9f (patch)
tree5f5698b4a4475e0a37bf7dce0c74b596a6300ded /Source/Core/InputCommon
parent0d49bf65a7db93c6d45864d350c3951b327625aa (diff)
ControllerEmu: Make BackgroundInput a global setting through the virtualization
This will allow us to simplify the checks for background input and push them further down into the architecture, into the ControllerEmu layer. The new setting isn't actually used yet, though.
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/ControllerEmu.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu.h
index 46f5477ff2..c15574ff6f 100644
--- a/Source/Core/InputCommon/ControllerEmu.h
+++ b/Source/Core/InputCommon/ControllerEmu.h
@@ -14,6 +14,7 @@
#include <vector>
#include "Common/IniFile.h"
+#include "Core/ConfigManager.h"
#include "InputCommon/GCPadStatus.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
@@ -114,6 +115,25 @@ public:
}
};
+ class BackgroundInputSetting : public Setting
+ {
+ public:
+ BackgroundInputSetting(const std::string &_name) : Setting(_name, false)
+ {
+ is_virtual = true;
+ }
+
+ void SetValue(ControlState new_value) override
+ {
+ SConfig::GetInstance().m_BackgroundInput = new_value;
+ }
+
+ ControlState GetValue() override
+ {
+ return SConfig::GetInstance().m_BackgroundInput;
+ }
+ };
+
ControlGroup(const std::string& _name, const unsigned int _type = GROUP_TYPE_OTHER) : name(_name), type(_type) {}
virtual ~ControlGroup() {}