diff --git a/include/flecs.h b/include/flecs.h index e6debdc47..108db3fb9 100644 --- a/include/flecs.h +++ b/include/flecs.h @@ -494,7 +494,7 @@ void ecs_set_target_fps( * @param return The current target FPS. */ FLECS_EXPORT -uint32_t ecs_get_target_fps( +float ecs_get_target_fps( ecs_world_t *world); /** Get last delta time from world. diff --git a/include/flecs/flecs.hpp b/include/flecs/flecs.hpp index 020286c5e..1bc5fce53 100644 --- a/include/flecs/flecs.hpp +++ b/include/flecs/flecs.hpp @@ -362,11 +362,11 @@ class world final { } /* Time management */ - void set_target_fps(std::uint32_t target_fps) const { + void set_target_fps(float target_fps) const { ecs_set_target_fps(m_world, target_fps); } - std::uint32_t get_target_fps() const { + float get_target_fps() const { return ecs_get_target_fps(m_world); } diff --git a/src/world.c b/src/world.c index 85bac2e22..e47d26428 100644 --- a/src/world.c +++ b/src/world.c @@ -1384,6 +1384,13 @@ void ecs_set_target_fps( } } +float ecs_get_target_fps( + ecs_world_t *world) +{ + return world->target_fps; +} + + /* Mock types so we don't have to depend on them. * TODO: Need a better workaround */ typedef uint16_t EcsAdmin; @@ -1652,8 +1659,3 @@ uint32_t ecs_get_threads( return ecs_vector_count(world->worker_threads); } -uint32_t ecs_get_target_fps( - ecs_world_t *world) -{ - return world->target_fps; -}