From 32142b98f2ba4a79dd1c94e38ad6f18f7f2458d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20=C4=8Cas?= Date: Wed, 19 Jul 2023 20:52:47 +0200 Subject: [PATCH] Add a `ecs_singleton_set_ptr`, to mirror `ecs_set_ptr` --- include/flecs/addons/flecs_c.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/flecs/addons/flecs_c.h b/include/flecs/addons/flecs_c.h index 04fc70423..1b439c47d 100644 --- a/include/flecs/addons/flecs_c.h +++ b/include/flecs/addons/flecs_c.h @@ -408,6 +408,9 @@ #define ecs_singleton_get(world, comp)\ ecs_get(world, ecs_id(comp), comp) +#define ecs_singleton_set_ptr(world, comp, ptr)\ + ecs_set_ptr(world, ecs_id(comp), comp, ptr) + #define ecs_singleton_set(world, comp, ...)\ ecs_set(world, ecs_id(comp), comp, __VA_ARGS__)