diff options
| author | JosJuice <josjuice@gmail.com> | 2021-04-03 13:49:26 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-10-03 22:04:09 +0200 |
| commit | 51ee05cb35f401c82adf815cbb4f4c3133e7ea84 (patch) | |
| tree | c6e206df257937e8373aeeb012e29ea74f0d0fc7 /Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp | |
| parent | b296248b49d3cfe130756feda5941d717fdba75d (diff) | |
Android: Use input override system for touch controls
This is the first step of getting rid of the controller indirection
on Android. (Needing a way for touch controls to provide input
to the emulator core is the reason why the controller indirection
exists to begin with as far as I understand it.)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp b/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp index 7b15f92de9..d55284a65a 100644 --- a/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Touch/ButtonManager.cpp @@ -9,23 +9,11 @@ #include <unordered_map> #include <vector> -#include "Common/Assert.h" #include "Common/FileUtil.h" #include "Common/IniFile.h" #include "Common/StringUtil.h" #include "Common/Thread.h" -#include "Core/Core.h" -#include "Core/HW/GCPad.h" -#include "Core/HW/GCPadEmu.h" -#include "Core/HW/Wiimote.h" -#include "Core/HW/WiimoteEmu/Extension/Classic.h" -#include "Core/HW/WiimoteEmu/Extension/Nunchuk.h" -#include "Core/HW/WiimoteEmu/WiimoteEmu.h" - -#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" -#include "InputCommon/ControllerEmu/StickGate.h" - namespace ButtonManager { namespace @@ -700,39 +688,6 @@ float GetAxisValue(int pad_id, ButtonType axis) return value; } -double GetInputRadiusAtAngle(int pad_id, ButtonType stick, double angle) -{ - // To avoid a crash, don't access controllers before they've been initialized by the boot process - if (!Core::IsRunningAndStarted()) - return 0; - - ControllerEmu::ControlGroup* group; - - switch (stick) - { - case STICK_MAIN: - group = Pad::GetGroup(pad_id, PadGroup::MainStick); - break; - case STICK_C: - group = Pad::GetGroup(pad_id, PadGroup::CStick); - break; - case NUNCHUK_STICK: - group = Wiimote::GetNunchukGroup(pad_id, WiimoteEmu::NunchukGroup::Stick); - break; - case CLASSIC_STICK_LEFT: - group = Wiimote::GetClassicGroup(pad_id, WiimoteEmu::ClassicGroup::LeftStick); - break; - case CLASSIC_STICK_RIGHT: - group = Wiimote::GetClassicGroup(pad_id, WiimoteEmu::ClassicGroup::RightStick); - break; - default: - ASSERT(false); - return 0; - } - - return static_cast<ControllerEmu::ReshapableInput*>(group)->GetInputRadiusAtAngle(angle); -} - bool GamepadEvent(const std::string& dev, int button, int action) { auto it = m_controllers.find(dev); |
