mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-10-07 15:53:34 +00:00
Motion Input: Add "enable" checkbox for motion controlled cursor.
This commit is contained in:
parent
d67a2304b0
commit
f7a50545e3
@ -325,6 +325,12 @@ void EmulateIMUCursor(std::optional<RotationalState>* state, ControllerEmu::IMUC
|
|||||||
// Avoid having to double dereference
|
// Avoid having to double dereference
|
||||||
auto& st = *state;
|
auto& st = *state;
|
||||||
|
|
||||||
|
if (!imu_ir_group->enabled)
|
||||||
|
{
|
||||||
|
st = std::nullopt;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto accel = imu_accelerometer_group->GetState();
|
auto accel = imu_accelerometer_group->GetState();
|
||||||
auto ang_vel = imu_gyroscope_group->GetState();
|
auto ang_vel = imu_gyroscope_group->GetState();
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@
|
|||||||
namespace ControllerEmu
|
namespace ControllerEmu
|
||||||
{
|
{
|
||||||
IMUCursor::IMUCursor(std::string name, std::string ui_name)
|
IMUCursor::IMUCursor(std::string name, std::string ui_name)
|
||||||
: ControlGroup(std::move(name), std::move(ui_name), GroupType::IMUCursor)
|
: ControlGroup(std::move(name), std::move(ui_name), GroupType::IMUCursor,
|
||||||
|
ControlGroup::CanBeDisabled::Yes)
|
||||||
{
|
{
|
||||||
controls.emplace_back(std::make_unique<Input>(Translate, _trans("Recenter")));
|
controls.emplace_back(std::make_unique<Input>(Translate, _trans("Recenter")));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user