mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06: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
|
struct Storage
|
||||||
{
|
{
|
||||||
std::mutex m_mutex;
|
std::recursive_mutex m_mutex;
|
||||||
std::vector<HookImpl*> m_listeners;
|
std::vector<HookImpl*> m_listeners;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user