ControllerInterface/Android: Rip out ButtonManager

ButtonManager is very different from how a normal input backend works,
and is making it hard for us to improve controller support on Android.
The following commits will add a new input backend in its place.
This commit is contained in:
JosJuice
2021-08-14 15:03:54 +02:00
parent 95ce41ac56
commit 0150f521f7
10 changed files with 9 additions and 1474 deletions

View File

@ -4,29 +4,10 @@
#include "InputCommon/ControllerInterface/Android/Android.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/ControllerInterface/Touch/Touchscreen.h"
namespace ciface::Android
{
static bool s_accelerometer_enabled = false;
static bool s_gyroscope_enabled = false;
void SetMotionSensorsEnabled(bool accelerometer_enabled, bool gyroscope_enabled)
{
const bool any_changes =
s_accelerometer_enabled != accelerometer_enabled || s_gyroscope_enabled != gyroscope_enabled;
s_accelerometer_enabled = accelerometer_enabled;
s_gyroscope_enabled = gyroscope_enabled;
if (any_changes)
g_controller_interface.RefreshDevices();
}
void PopulateDevices()
{
for (int i = 0; i < 8; ++i)
g_controller_interface.AddDevice(std::make_shared<ciface::Touch::Touchscreen>(
i, s_accelerometer_enabled, s_gyroscope_enabled));
}
} // namespace ciface::Android