From d0179559466ff09731d74474322ee880fbb44b00 Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Sun, 21 Jul 2024 14:07:48 +0200 Subject: [PATCH] pica: Move mutex lock below tracing check on register write (#210) Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> --- src/video_core/debug_utils/debug_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 7b593194d..88ee841c1 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp @@ -272,11 +272,11 @@ void StartPicaTracing() { } void OnPicaRegWrite(u16 cmd_id, u16 mask, u32 value) { - std::lock_guard lock(pica_trace_mutex); - if (!g_is_pica_tracing) return; + std::lock_guard lock(pica_trace_mutex); + pica_trace->writes.push_back(PicaTrace::Write{cmd_id, mask, value}); }