adding multiple hooks supports for events and loop

This commit is contained in:
2024-12-17 02:33:04 +01:00
parent 30f4602b1c
commit 62bd63c364
15 changed files with 77 additions and 59 deletions

View File

@@ -38,8 +38,11 @@ namespace mlx
m_in.FetchInputs();
if(f_loop_hook)
f_loop_hook(p_param);
for(const auto& hook : m_hooks)
{
if(hook.fn)
hook.fn(hook.param);
}
for(auto& gs : m_graphics)
{