Commit graph

12 commits

Author SHA1 Message Date
Valeri
ffc1f4df39 input_common: nitpick about SetHatButton usage 2022-01-17 12:04:38 +03:00
german77
10439bbfff input_common: Use accelerometer data for mapping 2022-01-06 20:05:49 -06:00
Lioncash
e609218c0f input_engine: Simplify PreSet* family of functions
We can make use of try_emplace() to insert values only if they don't
already exist.
2021-12-13 10:18:04 -05:00
Lioncash
14f7f35957 input_engine: Avoid redundant map lookups
We can use iterators to avoid looking up into maps twice in the getter
functions.

At the same time we can also avoid copying the ControllerData structs,
since they're 264 bytes in size.
2021-12-13 09:57:51 -05:00
Lioncash
f8db0a76af input_engine: Iterate by reference rather than by value where applicable
Avoids creating copies of several object instances (some of which being
over 100 bytes in size).
2021-12-13 09:57:51 -05:00
Lioncash
190cfc5997 input_engine: Take BasicMotion by const reference with SetMotion() and TriggerOnMotionChange()
Copies the BasicMotion instance once instead of twice.
2021-12-13 09:57:39 -05:00
Lioncash
e0e9f98fc6 input_engine: std::move InputIdentifier in SetCallback()
Allows avoiding std::function allocations.
2021-12-13 09:23:23 -05:00
german77
30de38ee7f kraken: Address comments from review
Fix compiler bug
2021-11-24 20:30:28 -06:00
german77
4736326a05 second commit lion review 2021-11-24 20:30:26 -06:00
german77
a8852024b6 settings: Fix Debug controller type options 2021-11-24 20:30:26 -06:00
german77
d1bac9024d settings: Fix mouse and keyboard mappings 2021-11-24 20:30:25 -06:00
german77
312dd2fb89 input_common: Create input_engine 2021-11-24 20:30:22 -06:00