mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix threaded OpenGL lockup when trying to remove invalid buffer
This commit is contained in:
parent
b261f34b0d
commit
1384584af6
|
@ -139,10 +139,12 @@ const char* RingBufferPool::getBufferFromPool(PoolBufferPointer _poolBufferPoint
|
|||
|
||||
void RingBufferPool::removeBufferFromPool(PoolBufferPointer _poolBufferPointer)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
m_inUseStartOffset = _poolBufferPointer.m_offset + _poolBufferPointer.m_realSize;
|
||||
m_full = false;
|
||||
m_condition.notify_one();
|
||||
if (_poolBufferPointer.isValid()) {
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
m_inUseStartOffset = _poolBufferPointer.m_offset + _poolBufferPointer.m_realSize;
|
||||
m_full = false;
|
||||
m_condition.notify_one();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user