summaryrefslogtreecommitdiffstats
path: root/src/input_common/input_engine.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-12-13 16:18:02 +0100
committerLioncash <mathew1800@gmail.com>2021-12-13 16:18:04 +0100
commita9d39b68952bf3ce9607a5947f056eb990e2b430 (patch)
tree03c083b4c17c1d8365177f73065c410207305222 /src/input_common/input_engine.h
parentinput_engine: Avoid redundant map lookups (diff)
downloadyuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.tar
yuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.tar.gz
yuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.tar.bz2
yuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.tar.lz
yuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.tar.xz
yuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.tar.zst
yuzu-a9d39b68952bf3ce9607a5947f056eb990e2b430.zip
Diffstat (limited to 'src/input_common/input_engine.h')
-rw-r--r--src/input_common/input_engine.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h
index 59707e173..ec8890484 100644
--- a/src/input_common/input_engine.h
+++ b/src/input_common/input_engine.h
@@ -23,15 +23,15 @@ struct PadIdentifier {
friend constexpr bool operator==(const PadIdentifier&, const PadIdentifier&) = default;
};
-// Basic motion data containing data from the sensors and a timestamp in microsecons
+// Basic motion data containing data from the sensors and a timestamp in microseconds
struct BasicMotion {
- float gyro_x;
- float gyro_y;
- float gyro_z;
- float accel_x;
- float accel_y;
- float accel_z;
- u64 delta_timestamp;
+ float gyro_x{};
+ float gyro_y{};
+ float gyro_z{};
+ float accel_x{};
+ float accel_y{};
+ float accel_z{};
+ u64 delta_timestamp{};
};
// Stages of a battery charge
@@ -202,7 +202,7 @@ private:
std::unordered_map<int, u8> hat_buttons;
std::unordered_map<int, float> axes;
std::unordered_map<int, BasicMotion> motions;
- BatteryLevel battery;
+ BatteryLevel battery{};
};
void TriggerOnButtonChange(const PadIdentifier& identifier, int button, bool value);