From f07457b6ccb0ef6773b08c0e494df28a29c1b3e6 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 8 Feb 2020 20:36:26 -0600 Subject: InputCommon: Eliminate some duplicated button threshold logic. --- Source/Core/InputCommon/ControllerEmu/Control/Control.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerEmu/Control') 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 #include -class ControlReference; +#include "InputCommon/ControlReference/ControlReference.h" namespace ControllerEmu { @@ -22,6 +22,12 @@ class Control public: virtual ~Control(); + template + T GetState() + { + return control_ref->GetState(); + } + std::unique_ptr const control_ref; const Translatability translate; const std::string name; @@ -33,4 +39,5 @@ protected: Control(std::unique_ptr ref, Translatability translate, const std::string& name); }; + } // namespace ControllerEmu -- cgit v1.2.3