Android: Declare host thread when generating analytics ID

Another instance of the host thread check failing.
This commit is contained in:
JosJuice 2023-06-21 18:16:46 +02:00
parent 6c50de06be
commit 1f130bf8a3
1 changed files with 6 additions and 0 deletions

View File

@ -531,12 +531,18 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Initialize(J
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_ReportStartToAnalytics(JNIEnv*,
jclass)
{
// Identity generation ends up calling config code, and some config callbacks use RunAsCPUThread
HostThreadLock guard;
DolphinAnalytics::Instance().ReportDolphinStart(GetAnalyticValue("DEVICE_TYPE"));
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GenerateNewStatisticsId(JNIEnv*,
jclass)
{
// Identity generation ends up calling config code, and some config callbacks use RunAsCPUThread
HostThreadLock guard;
DolphinAnalytics::Instance().GenerateNewIdentity();
}