From e16e1771485c970861383cdc52fb8b59846e21b5 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 5 Mar 2011 12:05:58 +0000 Subject: [PATCH] Missed a critical section. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7295 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/DSP/DSPCore.h | 2 +- Source/Core/VideoCommon/Src/BPStructs.cpp | 5 +---- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Src/DSP/DSPCore.h b/Source/Core/Core/Src/DSP/DSPCore.h index a2446cbe55..d15da70687 100644 --- a/Source/Core/Core/Src/DSP/DSPCore.h +++ b/Source/Core/Core/Src/DSP/DSPCore.h @@ -249,7 +249,7 @@ struct SDSP volatile u16 mbox[2][2]; // Mutex protecting the mailbox. - std::mutex g_CriticalSection; + //std::mutex g_CriticalSection; // Accelerator / DMA / other hardware registers. Not GPRs. u16 ifx_regs[256]; diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 259a402240..b83104b522 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -96,7 +96,7 @@ void BPWritten(const BPCmd& bp) //} // FIXME: Hangs load-state, but should fix graphic-heavy games state loading - //s_bpCritical.Enter(); + //std::lock_guard lk(s_bpCritical); // BEGIN ZTP SPEEDUP HACK CHANGES // This hunk of code disables the usual pipeline flush for certain BP Writes @@ -631,9 +631,6 @@ void BPWritten(const BPCmd& bp) break; } } - - // FIXME: Hangs load-state, but should fix graphic-heavy games state loading - //s_bpCritical.Leave(); } } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index c0a95f1f8f..be90543161 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -1224,7 +1224,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons #else if (g_ActiveConfig.bDumpFrames) { - s_criticalScreenshot.Enter(); + std::lock_guard lk(s_criticalScreenshot); std::string movie_file_name; w = dst_rect.GetWidth(); h = dst_rect.GetHeight(); @@ -1256,7 +1256,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons } delete[] data; - s_criticalScreenshot.Leave(); } else {