From c8327ad5142cf35b4645cce4a750743a7603237e Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 20 Jan 2024 13:59:16 +0100 Subject: [PATCH] Revert "Android: Attach CPU thread to JVM early" This reverts commit e86d713600b5e97af9904518b47152c97949c85e. A proper fix was added in 86c1f6e1e7e2abcc3f42e1182134e632b218b6d3, so the workaround is no longer necessary. --- Source/Core/Core/Core.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index e686fca30f..85a75896d6 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -96,10 +96,6 @@ #include "VideoCommon/VideoBackendBase.h" #include "VideoCommon/VideoEvents.h" -#ifdef ANDROID -#include "jni/AndroidCommon/IDCache.h" -#endif - namespace Core { static bool s_wants_determinism; @@ -388,12 +384,6 @@ static void CpuThread(Core::System& system, const std::optional& sa // Clear performance data collected from previous threads. g_perf_metrics.Reset(); -#ifdef ANDROID - // For some reason, calling the JNI function AttachCurrentThread from the CPU thread after a - // certain point causes a crash if fastmem is enabled. Let's call it early to avoid that problem. - static_cast(IDCache::GetEnvForThread()); -#endif - // The JIT need to be able to intercept faults, both for fastmem and for the BLR optimization. const bool exception_handler = EMM::IsExceptionHandlerSupported(); if (exception_handler)