summaryrefslogtreecommitdiff
path: root/Source/Android/jni/MainAndroid.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2023-06-21 18:16:46 +0200
committerJosJuice <josjuice@gmail.com>2023-06-21 18:16:46 +0200
commit1f130bf8a3e1d8e0e135b452b709be5cb716d9bc (patch)
treec5252e2fed79999d1e9dbe6a2f2c047caa2bb5b3 /Source/Android/jni/MainAndroid.cpp
parent6c50de06be787723b903e027abbd8dcade520369 (diff)
Android: Declare host thread when generating analytics ID
Another instance of the host thread check failing.
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
-rw-r--r--Source/Android/jni/MainAndroid.cpp6
1 files changed, 6 insertions, 0 deletions
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();
}