mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
InputCommon: Extract ControlReference from ControllerInterface
Better separation of concerns. Relegates `ControllerInterface` to enumerating input controls, and the new `ControlReference` deals with combining inputs and configuration expression parsing.
This commit is contained in:
@ -42,8 +42,6 @@ public:
|
||||
public:
|
||||
virtual std::string GetName() const = 0;
|
||||
virtual ~Control() {}
|
||||
bool InputGateOn();
|
||||
|
||||
virtual Input* ToInput() { return nullptr; }
|
||||
virtual Output* ToOutput() { return nullptr; }
|
||||
};
|
||||
@ -59,15 +57,6 @@ public:
|
||||
// things like absolute axes/ absolute mouse position will override this
|
||||
virtual bool IsDetectable() { return true; }
|
||||
virtual ControlState GetState() const = 0;
|
||||
|
||||
ControlState GetGatedState()
|
||||
{
|
||||
if (InputGateOn())
|
||||
return GetState();
|
||||
else
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
Input* ToInput() override { return this; }
|
||||
};
|
||||
|
||||
@ -81,13 +70,6 @@ public:
|
||||
public:
|
||||
virtual ~Output() {}
|
||||
virtual void SetState(ControlState state) = 0;
|
||||
|
||||
void SetGatedState(ControlState state)
|
||||
{
|
||||
if (InputGateOn())
|
||||
SetState(state);
|
||||
}
|
||||
|
||||
Output* ToOutput() override { return this; }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user