mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 05:40:04 +00:00
Code review actions (plus hopefully fix the linux CI)
This commit is contained in:
parent
9bd189a155
commit
92640fc29c
46 changed files with 155 additions and 109 deletions
|
@ -210,10 +210,6 @@ void Module::UpdateAccelerometerCallback(u64 userdata, s64 cycles_late) {
|
|||
next_accelerometer_index = (next_accelerometer_index + 1) % mem->accelerometer.entries.size();
|
||||
|
||||
Common::Vec3<float> accel;
|
||||
if (!motion_device) {
|
||||
is_device_reload_pending.store(true);
|
||||
return;
|
||||
}
|
||||
std::tie(accel, std::ignore) = motion_device->GetStatus();
|
||||
accel *= accelerometer_coef;
|
||||
// TODO(wwylele): do a time stretch like the one in UpdateGyroscopeCallback
|
||||
|
@ -261,10 +257,6 @@ void Module::UpdateGyroscopeCallback(u64 userdata, s64 cycles_late) {
|
|||
GyroscopeDataEntry& gyroscope_entry = mem->gyroscope.entries[mem->gyroscope.index];
|
||||
|
||||
Common::Vec3<float> gyro;
|
||||
if (!motion_device) {
|
||||
is_device_reload_pending.store(true);
|
||||
return;
|
||||
}
|
||||
std::tie(std::ignore, gyro) = motion_device->GetStatus();
|
||||
double stretch = system.perf_stats->GetLastFrameTimeScale();
|
||||
gyro *= gyroscope_coef * static_cast<float>(stretch);
|
||||
|
|
|
@ -71,7 +71,9 @@ private:
|
|||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& hid_period;
|
||||
ar& calibration_data; // This isn't writeable for now, but might be in future
|
||||
RequestInputDevicesReload(); // zl, zr, c_stick are loaded here
|
||||
if (Archive::is_loading::value) {
|
||||
LoadInputDevices(); // zl, zr, c_stick are loaded here
|
||||
}
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue