summaryrefslogtreecommitdiff
path: root/Source/Android/jni/MainAndroid.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-03-04 19:36:26 -0800
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-03-04 19:45:34 -0800
commit456844639815b4bd2f136c161d6e558f96e6182e (patch)
tree215cd513fa48ff91f632058701e43fee95721893 /Source/Android/jni/MainAndroid.cpp
parent8f6fd912f7ef3d744661cfdd0c9c33d44c223310 (diff)
JitInterface::ClearCache: Modernize With CPUThreadGuard
It is recommended to view this diff with whitespace changes hidden.
Diffstat (limited to 'Source/Android/jni/MainAndroid.cpp')
-rw-r--r--Source/Android/jni/MainAndroid.cpp8
1 files changed, 4 insertions, 4 deletions
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*,