summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/Control/Control.h
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2020-02-10 00:05:10 +0000
committerGitHub <noreply@github.com>2020-02-10 00:05:10 +0000
commitdb65b9a766fd443eac48ced8e7693ef23b39e83e (patch)
treee428c2563bb014968679e59c447ce3eb62a7b830 /Source/Core/InputCommon/ControllerEmu/Control/Control.h
parente00459f68fd53b6a4d30800ce0548e459b141e5e (diff)
parentf07457b6ccb0ef6773b08c0e494df28a29c1b3e6 (diff)
Merge pull request #8616 from jordan-woyak/threshold-cleanup
InputCommon: Eliminate some duplicated button threshold logic.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/Control/Control.h')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/Control/Control.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/Control/Control.h b/Source/Core/InputCommon/ControllerEmu/Control/Control.h
index e005431873..18aa529a6c 100644
--- a/Source/Core/InputCommon/ControllerEmu/Control/Control.h
+++ b/Source/Core/InputCommon/ControllerEmu/Control/Control.h
@@ -7,7 +7,7 @@
#include <memory>
#include <string>
-class ControlReference;
+#include "InputCommon/ControlReference/ControlReference.h"
namespace ControllerEmu
{
@@ -22,6 +22,12 @@ class Control
public:
virtual ~Control();
+ template <typename T = ControlState>
+ T GetState()
+ {
+ return control_ref->GetState<T>();
+ }
+
std::unique_ptr<ControlReference> const control_ref;
const Translatability translate;
const std::string name;
@@ -33,4 +39,5 @@ protected:
Control(std::unique_ptr<ControlReference> ref, Translatability translate,
const std::string& name);
};
+
} // namespace ControllerEmu