InputCommon: Eliminate some duplicated button threshold logic.

This commit is contained in:
Jordan Woyak
2020-02-08 20:36:26 -06:00
parent 2e2540317e
commit f07457b6cc
17 changed files with 50 additions and 45 deletions

View File

@ -23,12 +23,7 @@ public:
void GetState(C* const buttons, const C* bitmasks)
{
for (auto& control : controls)
{
if (control->control_ref->GetState<bool>())
*buttons |= *bitmasks;
bitmasks++;
}
*buttons |= *(bitmasks++) * control->GetState<bool>();
}
};
} // namespace ControllerEmu