mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
HookableEvent: Use std::recursive_mutex instead of std::mutex
This fixes a crash when recording fifologs, as the mutex is acquired when BPWritten calls AfterFrameEvent::Trigger, but then acquired again when FifoRecorder::EndFrame calls m_end_of_frame_event.reset(). std::mutex does not allow calling lock() if the thread already owns the mutex, while std::recursive_mutex does allow this. This is a regression from #11522 (which introduced the HookableEvent system).
This commit is contained in:
@@ -69,7 +69,7 @@ private:
|
||||
|
||||
struct Storage
|
||||
{
|
||||
std::mutex m_mutex;
|
||||
std::recursive_mutex m_mutex;
|
||||
std::vector<HookImpl*> m_listeners;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user