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:
Pokechu22 2023-04-02 15:51:06 -07:00
parent aaeaa9c6b6
commit 9e0755a598

View File

@ -69,7 +69,7 @@ private:
struct Storage
{
std::mutex m_mutex;
std::recursive_mutex m_mutex;
std::vector<HookImpl*> m_listeners;
};