InputCommon: Eliminate some duplicated button threshold logic.

This commit is contained in:
Jordan Woyak
2020-02-09 10:37:18 -06:00
parent 2e2540317e
commit f07457b6cc
17 changed files with 50 additions and 45 deletions
@@ -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