mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Put buffer under the mutex
This commit is contained in:
parent
06a155a40d
commit
86319303e8
|
@ -112,8 +112,8 @@ void CGraphicsBackend_Threaded::StopProcessor()
|
|||
void CGraphicsBackend_Threaded::RunBuffer(CCommandBuffer *pBuffer)
|
||||
{
|
||||
WaitForIdle();
|
||||
m_pBuffer = pBuffer;
|
||||
std::unique_lock<std::mutex> Lock(m_BufferSwapMutex);
|
||||
m_pBuffer = pBuffer;
|
||||
m_BufferInProcess.store(true, std::memory_order_relaxed);
|
||||
m_BufferSwapCond.notify_all();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue