From 5cf07fdfbf07bbf768f3ed02bc29b45713b08106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 9 Jul 2016 14:29:41 +0200 Subject: Add relative input for the Wiimote IR This adds an option to enable relative input for the Wiimote IR as described in issue 9014. Enabling it will result in the pointer not going back to the centre and the inputs will control the direction, not the absolute position. Also adds a Dead Zone setting which is really needed when relative input is enabled to prevent the cursor from slowly drifting on most controllers. (Note: the Deadzone setting has no effect when relative input is disabled) --- Source/Core/InputCommon/ControllerEmu.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index 2fd85b3fac..5b0b93f021 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -299,6 +299,8 @@ ControllerEmu::Cursor::Cursor(const std::string& _name) numeric_settings.emplace_back(std::make_unique(_trans("Center"), 0.5)); numeric_settings.emplace_back(std::make_unique(_trans("Width"), 0.5)); numeric_settings.emplace_back(std::make_unique(_trans("Height"), 0.5)); + numeric_settings.emplace_back(std::make_unique(_trans("Dead Zone"), 0, 0, 20)); + boolean_settings.emplace_back(std::make_unique(_trans("Relative Input"), false)); } void ControllerEmu::LoadDefaults(const ControllerInterface& ciface) -- cgit v1.2.3 From 149654df5a7db04315badc95354bab3ccd02964f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 17 Jul 2016 14:32:06 +0200 Subject: Add a recenter control for Wiimote IR relative input This adds a recenter control binding which allows recentering the cursor when relative input is enabled. (EnableSettingControl is renamed to avoid confusions.) --- Source/Core/InputCommon/ControllerEmu.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index 5b0b93f021..84f511f822 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -295,6 +295,7 @@ ControllerEmu::Cursor::Cursor(const std::string& _name) controls.emplace_back(std::make_unique("Forward")); controls.emplace_back(std::make_unique("Backward")); controls.emplace_back(std::make_unique(_trans("Hide"))); + controls.emplace_back(std::make_unique("Recenter")); numeric_settings.emplace_back(std::make_unique(_trans("Center"), 0.5)); numeric_settings.emplace_back(std::make_unique(_trans("Width"), 0.5)); -- cgit v1.2.3