From fc96c81c707b430901369a932bee2ad27e24628c Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Mon, 7 Apr 2025 10:08:05 +0200 Subject: [PATCH] EventMgr: Add CurrentEvent() accessor Avoid proliferation of accessors on EventMgr. --- src/Event.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Event.h b/src/Event.h index 5639fea96f..a5229b3e10 100644 --- a/src/Event.h +++ b/src/Event.h @@ -116,6 +116,11 @@ public: // by returning a zero-timeout. double GetNextTimeout() override { return head ? 0.0 : -1.0; } + /** + * @return A pointer to the currently dispatched event or nullptr. + */ + const Event* CurrentEvent() const { return current; } + void Process() override; const char* Tag() override { return "EventManager"; } void InitPostScript();