Add SL SR vectors, change dual joycon view, add missing raw data from keyboard/mouse

This commit is contained in:
german 2021-02-02 21:39:47 -06:00
parent a7f9983563
commit c9597af39d
4 changed files with 249 additions and 180 deletions

View file

@ -139,6 +139,10 @@ public:
static_cast<float>(y) * coef * (x == 0 ? 1.0f : SQRT_HALF));
}
Input::AnalogProperties GetAnalogProperties() const override {
return {modifier_scale, 1.0f, 0.5f};
}
bool GetAnalogDirectionStatus(Input::AnalogDirection direction) const override {
switch (direction) {
case Input::AnalogDirection::RIGHT:

View file

@ -106,6 +106,16 @@ public:
return {0.0f, 0.0f};
}
std::tuple<float, float> GetRawStatus() const override {
const float x = GetAxis(axis_x);
const float y = GetAxis(axis_y);
return {x, y};
}
Input::AnalogProperties GetAnalogProperties() const override {
return {deadzone, range, 0.5f};
}
private:
const u32 button;
const u32 axis_x;