summaryrefslogtreecommitdiffstats
path: root/src/input_common/motion_input.h
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2020-10-04 05:22:01 +0200
committergerman <german@thesoftwareartisans.com>2020-10-04 05:22:01 +0200
commita220d8799ed332c1d8f2231b18079b1210511bcd (patch)
treea3fd52115f177514a5b2ff2e86326f9cd4e2b294 /src/input_common/motion_input.h
parentMerge pull request #4291 from german77/ImplementControllerRumble (diff)
downloadyuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.tar
yuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.tar.gz
yuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.tar.bz2
yuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.tar.lz
yuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.tar.xz
yuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.tar.zst
yuzu-a220d8799ed332c1d8f2231b18079b1210511bcd.zip
Diffstat (limited to 'src/input_common/motion_input.h')
-rw-r--r--src/input_common/motion_input.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input_common/motion_input.h b/src/input_common/motion_input.h
index 54b4439d9..f6c1fece7 100644
--- a/src/input_common/motion_input.h
+++ b/src/input_common/motion_input.h
@@ -29,8 +29,8 @@ public:
void EnableReset(bool reset);
void ResetRotations();
- void UpdateRotation(u64 elapsed_time);
- void UpdateOrientation(u64 elapsed_time);
+ void UpdateRotation(const u64 elapsed_time);
+ void UpdateOrientation(const u64 elapsed_time);
std::array<Common::Vec3f, 3> GetOrientation() const;
Common::Vec3f GetAcceleration() const;
@@ -43,6 +43,7 @@ public:
private:
void ResetOrientation();
+ void SetOrientationFromAccelerometer();
// PID constants
const f32 kp;
@@ -63,6 +64,7 @@ private:
f32 gyro_threshold = 0.0f;
u32 reset_counter = 0;
bool reset_enabled = true;
+ bool only_accelerometer = true;
};
} // namespace InputCommon