citra-emu
/
citra-canary
Archived
1
0
Fork 0

HID: fix a comment and a warning

This commit is contained in:
wwylele 2017-08-20 08:37:48 +03:00
parent 223bd35450
commit 54c0c8adee
1 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ static void UpdateAccelerometerCallback(u64 userdata, int cycles_late) {
Math::Vec3<float> accel; Math::Vec3<float> accel;
std::tie(accel, std::ignore) = motion_device->GetStatus(); std::tie(accel, std::ignore) = motion_device->GetStatus();
accel *= accelerometer_coef; accel *= accelerometer_coef;
// TODO(wwylele): do a time stretch as it in UpdateGyroscopeCallback // TODO(wwylele): do a time stretch like the one in UpdateGyroscopeCallback
// The time stretch formula should be like // The time stretch formula should be like
// stretched_vector = (raw_vector - gravity) * stretch_ratio + gravity // stretched_vector = (raw_vector - gravity) * stretch_ratio + gravity
@ -246,7 +246,7 @@ static void UpdateGyroscopeCallback(u64 userdata, int cycles_late) {
Math::Vec3<float> gyro; Math::Vec3<float> gyro;
std::tie(std::ignore, gyro) = motion_device->GetStatus(); std::tie(std::ignore, gyro) = motion_device->GetStatus();
float stretch = Core::System::GetInstance().perf_stats.GetLastFrameTimeScale(); double stretch = Core::System::GetInstance().perf_stats.GetLastFrameTimeScale();
gyro *= gyroscope_coef * stretch; gyro *= gyroscope_coef * stretch;
gyroscope_entry.x = static_cast<s16>(gyro.x); gyroscope_entry.x = static_cast<s16>(gyro.x);
gyroscope_entry.y = static_cast<s16>(gyro.y); gyroscope_entry.y = static_cast<s16>(gyro.y);