From f7b4866811c63ae24c366d9452e53d24e504336f Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 12 Dec 2024 19:47:59 +0100 Subject: fps fix + regression test --- src/crepe/manager/LoopTimerManager.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/crepe/manager/LoopTimerManager.h') diff --git a/src/crepe/manager/LoopTimerManager.h b/src/crepe/manager/LoopTimerManager.h index 91403e4..c943d41 100644 --- a/src/crepe/manager/LoopTimerManager.h +++ b/src/crepe/manager/LoopTimerManager.h @@ -6,7 +6,7 @@ namespace crepe { -typedef std::chrono::duration duration_t; +typedef std::chrono::duration duration_t; typedef std::chrono::duration elapsed_time_t; /** @@ -149,9 +149,9 @@ private: private: //! Target frames per second. - unsigned target_fps = 60; + unsigned int target_fps = 60; //! Actual frames per second. - unsigned actual_fps = 0; + unsigned int actual_fps = 0; //! Time scale for speeding up or slowing down the game (0 = pause, < 1 = slow down, 1 = normal speed, > 1 = speed up). float time_scale = 1; //! Maximum delta time in seconds to avoid large jumps. -- cgit v1.2.3 From 15c25ba41d0e128c61b38c1751bf5eb36b5a040c Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 12 Dec 2024 19:51:10 +0100 Subject: made return unsigned int --- src/crepe/manager/LoopTimerManager.cpp | 2 +- src/crepe/manager/LoopTimerManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crepe/manager/LoopTimerManager.h') diff --git a/src/crepe/manager/LoopTimerManager.cpp b/src/crepe/manager/LoopTimerManager.cpp index 9d24c2b..57956f2 100644 --- a/src/crepe/manager/LoopTimerManager.cpp +++ b/src/crepe/manager/LoopTimerManager.cpp @@ -1,6 +1,6 @@ +#include "../util/Log.h" #include #include -#include "../util/Log.h" #include "LoopTimerManager.h" diff --git a/src/crepe/manager/LoopTimerManager.h b/src/crepe/manager/LoopTimerManager.h index c943d41..76b02d3 100644 --- a/src/crepe/manager/LoopTimerManager.h +++ b/src/crepe/manager/LoopTimerManager.h @@ -55,7 +55,7 @@ public: * * \return Current FPS. */ - unsigned get_fps() const; + unsigned int get_fps() const; /** * \brief Get the current time scale. -- cgit v1.2.3