pica: Move mutex lock below tracing check on register write (#210)

Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
This commit is contained in:
PabloMK7 2024-07-21 14:07:48 +02:00 committed by GitHub
parent 63450b662e
commit d017955946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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});
}