Remove RealMotionDevice
This commit is contained in:
parent
8e18b61972
commit
0774b17846
7 changed files with 41 additions and 35 deletions
|
@ -251,7 +251,7 @@ void Controller_NPad::OnLoadInputDevices() {
|
|||
sticks[i].begin(), Input::CreateDevice<Input::AnalogDevice>);
|
||||
std::transform(players[i].motions.begin() + Settings::NativeMotion::MOTION_HID_BEGIN,
|
||||
players[i].motions.begin() + Settings::NativeMotion::MOTION_HID_END,
|
||||
motions[i].begin(), Input::CreateDevice<Input::RealMotionDevice>);
|
||||
motions[i].begin(), Input::CreateDevice<Input::MotionDevice>);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,8 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8*
|
|||
std::tie(motion_devices[e].accel, motion_devices[e].gyro,
|
||||
motion_devices[e].rotation, motion_devices[e].orientation) =
|
||||
device->GetStatus();
|
||||
sixaxis_at_rest = sixaxis_at_rest && motion_devices[e].gyro.Length2() < 1.0f;
|
||||
sixaxis_at_rest =
|
||||
sixaxis_at_rest && motion_devices[e].gyro.Length2() < 0.00005f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -299,9 +299,9 @@ private:
|
|||
|
||||
struct MotionDevice {
|
||||
Common::Vec3f accel;
|
||||
Common::Vec3f gyro{};
|
||||
Common::Vec3f gyro;
|
||||
Common::Vec3f rotation;
|
||||
std::array<Common::Vec3f, 3> orientation{};
|
||||
std::array<Common::Vec3f, 3> orientation;
|
||||
};
|
||||
|
||||
struct NPadEntry {
|
||||
|
@ -358,9 +358,9 @@ private:
|
|||
using StickArray = std::array<
|
||||
std::array<std::unique_ptr<Input::AnalogDevice>, Settings::NativeAnalog::NUM_STICKS_HID>,
|
||||
10>;
|
||||
using MotionArray = std::array<std::array<std::unique_ptr<Input::RealMotionDevice>,
|
||||
Settings::NativeMotion::NUM_MOTION_HID>,
|
||||
10>;
|
||||
using MotionArray = std::array<
|
||||
std::array<std::unique_ptr<Input::MotionDevice>, Settings::NativeMotion::NUM_MOTION_HID>,
|
||||
10>;
|
||||
ButtonArray buttons;
|
||||
StickArray sticks;
|
||||
MotionArray motions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue