Commit graph

5 commits

Author SHA1 Message Date
Pokechu22
9e0755a598 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).
2023-04-02 15:51:21 -07:00
Scott Mansell
901f12c935 HookableEvents: Add [[nodiscard]] to Register 2023-03-06 00:12:26 +13:00
Scott Mansell
05181f6b88 HookableEvent: Switch to construct on first use
A registration might happen during static initialization, which opens
us up to issues with ordering of static initialization.
2023-02-13 18:48:43 +13:00
Scott Mansell
59a4b026f6 Better documentation for HookableEvent. 2023-02-09 18:36:20 +13:00
Scott Mansell
8c8bd0e7ac Rename to HookableEvent. Because naming conflict 2023-02-09 18:36:20 +13:00
Renamed from Source/Core/Common/EventHook.h (Browse further)