diff options
| author | 2017-08-20 08:37:48 +0300 | |
|---|---|---|
| committer | 2017-08-20 08:37:48 +0300 | |
| commit | 54c0c8adee90d374e954e742d6d03279ef2e7ed7 (patch) | |
| tree | 5629edabe63a4006a163dc3bba93f72f95bb787e | |
| parent | motion_emu: no need to include thread in header (diff) | |
| download | yuzu-54c0c8adee90d374e954e742d6d03279ef2e7ed7.tar.gz yuzu-54c0c8adee90d374e954e742d6d03279ef2e7ed7.tar.xz yuzu-54c0c8adee90d374e954e742d6d03279ef2e7ed7.zip | |
HID: fix a comment and a warning
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 4 |
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); |