summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/hid/hid.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index a13b72e88..31f34a7ae 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -203,7 +203,7 @@ static void UpdateAccelerometerCallback(u64 userdata, int cycles_late) {
203 Math::Vec3<float> accel; 203 Math::Vec3<float> accel;
204 std::tie(accel, std::ignore) = motion_device->GetStatus(); 204 std::tie(accel, std::ignore) = motion_device->GetStatus();
205 accel *= accelerometer_coef; 205 accel *= accelerometer_coef;
206 // TODO(wwylele): do a time stretch as it in UpdateGyroscopeCallback 206 // TODO(wwylele): do a time stretch like the one in UpdateGyroscopeCallback
207 // The time stretch formula should be like 207 // The time stretch formula should be like
208 // stretched_vector = (raw_vector - gravity) * stretch_ratio + gravity 208 // stretched_vector = (raw_vector - gravity) * stretch_ratio + gravity
209 209
@@ -246,7 +246,7 @@ static void UpdateGyroscopeCallback(u64 userdata, int cycles_late) {
246 246
247 Math::Vec3<float> gyro; 247 Math::Vec3<float> gyro;
248 std::tie(std::ignore, gyro) = motion_device->GetStatus(); 248 std::tie(std::ignore, gyro) = motion_device->GetStatus();
249 float stretch = Core::System::GetInstance().perf_stats.GetLastFrameTimeScale(); 249 double stretch = Core::System::GetInstance().perf_stats.GetLastFrameTimeScale();
250 gyro *= gyroscope_coef * stretch; 250 gyro *= gyroscope_coef * stretch;
251 gyroscope_entry.x = static_cast<s16>(gyro.x); 251 gyroscope_entry.x = static_cast<s16>(gyro.x);
252 gyroscope_entry.y = static_cast<s16>(gyro.y); 252 gyroscope_entry.y = static_cast<s16>(gyro.y);