From 456844639815b4bd2f136c161d6e558f96e6182e Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:36:26 -0800 Subject: JitInterface::ClearCache: Modernize With CPUThreadGuard It is recommended to view this diff with whitespace changes hidden. --- Source/Android/jni/MainAndroid.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Android/jni/MainAndroid.cpp') diff --git a/Source/Android/jni/MainAndroid.cpp b/Source/Android/jni/MainAndroid.cpp index 6a74cabd87..7667836957 100644 --- a/Source/Android/jni/MainAndroid.cpp +++ b/Source/Android/jni/MainAndroid.cpp @@ -408,12 +408,12 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling jboolean enable) { HostThreadLock guard; - Core::SetState(Core::State::Paused); - auto& jit_interface = Core::System::GetInstance().GetJitInterface(); - jit_interface.ClearCache(); + auto& system = Core::System::GetInstance(); + auto& jit_interface = system.GetJitInterface(); + const Core::CPUThreadGuard cpu_guard(system); + jit_interface.ClearCache(cpu_guard); jit_interface.SetProfilingState(enable ? JitInterface::ProfilingState::Enabled : JitInterface::ProfilingState::Disabled); - Core::SetState(Core::State::Running); } JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_WriteProfileResults(JNIEnv*, -- cgit v1.2.3