mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +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)
|
void RingBufferPool::removeBufferFromPool(PoolBufferPointer _poolBufferPointer)
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(m_mutex);
|
if (_poolBufferPointer.isValid()) {
|
||||||
m_inUseStartOffset = _poolBufferPointer.m_offset + _poolBufferPointer.m_realSize;
|
std::unique_lock<std::mutex> lock(m_mutex);
|
||||||
m_full = false;
|
m_inUseStartOffset = _poolBufferPointer.m_offset + _poolBufferPointer.m_realSize;
|
||||||
m_condition.notify_one();
|
m_full = false;
|
||||||
|
m_condition.notify_one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user