diff options
| author | Tilka <tilkax@gmail.com> | 2020-02-10 00:05:10 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-10 00:05:10 +0000 |
| commit | db65b9a766fd443eac48ced8e7693ef23b39e83e (patch) | |
| tree | e428c2563bb014968679e59c447ce3eb62a7b830 /Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h | |
| parent | e00459f68fd53b6a4d30800ce0548e459b141e5e (diff) | |
| parent | f07457b6ccb0ef6773b08c0e494df28a29c1b3e6 (diff) | |
Merge pull request #8616 from jordan-woyak/threshold-cleanup
InputCommon: Eliminate some duplicated button threshold logic.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h index 9560a37843..b10677a615 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Buttons.h @@ -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 |
