mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-13 22:52:38 +00:00
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:
parent
95ce41ac56
commit
0150f521f7
10 changed files with 9 additions and 1474 deletions
Source/Android/jni
|
@ -51,8 +51,6 @@
|
|||
#include "DiscIO/ScrubbedBlob.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
|
||||
#include "InputCommon/ControllerInterface/Android/Android.h"
|
||||
#include "InputCommon/ControllerInterface/Touch/ButtonManager.h"
|
||||
#include "InputCommon/GCAdapter.h"
|
||||
|
||||
#include "UICommon/GameFile.h"
|
||||
|
@ -293,19 +291,20 @@ Java_org_dolphinemu_dolphinemu_NativeLibrary_IsRunningAndUnpaused(JNIEnv*, jclas
|
|||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(
|
||||
JNIEnv* env, jclass, jstring jDevice, jint Button, jint Action)
|
||||
{
|
||||
return ButtonManager::GamepadEvent(GetJString(env, jDevice), Button, Action);
|
||||
// TODO
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(
|
||||
JNIEnv* env, jclass, jstring jDevice, jint Axis, jfloat Value)
|
||||
{
|
||||
ButtonManager::GamepadAxisEvent(GetJString(env, jDevice), Axis, Value);
|
||||
// TODO
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetMotionSensorsEnabled(
|
||||
JNIEnv*, jclass, jboolean accelerometer_enabled, jboolean gyroscope_enabled)
|
||||
{
|
||||
ciface::Android::SetMotionSensorsEnabled(accelerometer_enabled, gyroscope_enabled);
|
||||
// TODO
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv* env,
|
||||
|
@ -583,8 +582,6 @@ static void Run(JNIEnv* env, std::unique_ptr<BootParameters>&& boot, bool riivol
|
|||
|
||||
if (BootManager::BootCore(std::move(boot), wsi))
|
||||
{
|
||||
ButtonManager::Init(SConfig::GetInstance().GetGameID());
|
||||
|
||||
static constexpr int WAIT_STEP = 25;
|
||||
while (Core::GetState() == Core::State::Starting)
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(WAIT_STEP));
|
||||
|
@ -604,7 +601,6 @@ static void Run(JNIEnv* env, std::unique_ptr<BootParameters>&& boot, bool riivol
|
|||
|
||||
s_game_metadata_is_valid = false;
|
||||
Core::Shutdown();
|
||||
ButtonManager::Shutdown();
|
||||
host_identity_guard.unlock();
|
||||
|
||||
env->CallStaticVoidMethod(IDCache::GetNativeLibraryClass(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue