From 1f130bf8a3e1d8e0e135b452b709be5cb716d9bc Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 21 Jun 2023 18:16:46 +0200 Subject: [PATCH] Android: Declare host thread when generating analytics ID Another instance of the host thread check failing. --- Source/Android/jni/MainAndroid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 5741afb9d8..8724b8449e 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -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(); }