diff options
author | Lectem <lectem@gmail.com> | 2015-07-26 15:56:45 +0200 |
---|---|---|
committer | Lectem <lectem@gmail.com> | 2015-07-26 16:28:44 +0200 |
commit | facb2555a9dab30eb76281122f3917f21e58fe84 (patch) | |
tree | 9bf2c5f62219e58de96890922025b95d7722272e /src/video_core/debug_utils | |
parent | citra-qt/command list: Do not recreate a widget after each selection (diff) | |
download | yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.tar yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.tar.gz yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.tar.bz2 yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.tar.lz yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.tar.xz yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.tar.zst yuzu-facb2555a9dab30eb76281122f3917f21e58fe84.zip |
Diffstat (limited to 'src/video_core/debug_utils')
-rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 827b09dff..27000283d 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp @@ -62,7 +62,7 @@ void DebugContext::OnEvent(Event event, void* data) { void DebugContext::Resume() { { - std::unique_lock<std::mutex> lock(breakpoint_mutex); + std::lock_guard<std::mutex> lock(breakpoint_mutex); // Tell all observers that we are about to resume for (auto& breakpoint_observer : breakpoint_observers) { @@ -268,11 +268,10 @@ void StartPicaTracing() return; } - pica_trace_mutex.lock(); + std::lock_guard<std::mutex> lock(pica_trace_mutex); pica_trace = std::unique_ptr<PicaTrace>(new PicaTrace); is_pica_tracing = true; - pica_trace_mutex.unlock(); } bool IsPicaTracing() @@ -286,7 +285,7 @@ void OnPicaRegWrite(PicaTrace::Write write) if (!is_pica_tracing) return; - std::unique_lock<std::mutex> lock(pica_trace_mutex); + std::lock_guard<std::mutex> lock(pica_trace_mutex); if (!is_pica_tracing) return; @@ -305,9 +304,9 @@ std::unique_ptr<PicaTrace> FinishPicaTracing() is_pica_tracing = false; // Wait until running tracing is finished - pica_trace_mutex.lock(); + std::lock_guard<std::mutex> lock(pica_trace_mutex); std::unique_ptr<PicaTrace> ret(std::move(pica_trace)); - pica_trace_mutex.unlock(); + return std::move(ret); } |