Android: Better GCAdapter scanning thread management

This commit is contained in:
Ryan Meredith 2020-08-27 07:43:20 -04:00
parent c36ae84b96
commit 9fe6466c79
3 changed files with 17 additions and 0 deletions

View file

@ -50,6 +50,7 @@
#include "InputCommon/ControllerInterface/Android/Android.h"
#include "InputCommon/ControllerInterface/Touch/ButtonManager.h"
#include "InputCommon/GCAdapter.h"
#include "UICommon/UICommon.h"
@ -630,6 +631,19 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReloadConfig
SConfig::GetInstance().LoadSettings();
}
JNIEXPORT void JNICALL
Java_org_dolphinemu_dolphinemu_NativeLibrary_UpdateGCAdapterScanThread(JNIEnv* env, jobject obj)
{
if (GCAdapter::UseAdapter())
{
GCAdapter::StartScanThread();
}
else
{
GCAdapter::StopScanThread();
}
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(JNIEnv* env,
jobject obj)
{