Fixes for portrait mode. Move the haptic feedback setting where it belongs.

This commit is contained in:
Henrik Rydgård 2023-02-02 11:59:56 +01:00
parent 1a035a726a
commit af8e4cd36b
5 changed files with 24 additions and 17 deletions

View file

@ -56,6 +56,8 @@ inline float clamp(float f) {
Tilt GenTilt(bool landscape, float calibrationAngle, float x, float y, float z, bool invertX, bool invertY, float deadzone, float xSensitivity, float ySensitivity) {
if (landscape) {
std::swap(x, y);
} else {
x *= -1.0f;
}
Lin::Vec3 down(x, y, z);