diff --git a/src/constants.hpp b/src/constants.hpp index 1ae27a545..323106a12 100644 --- a/src/constants.hpp +++ b/src/constants.hpp @@ -73,3 +73,6 @@ inline const std::string SKELETONS_FOLDER = "skeletons"; inline const std::string POST_EFFECTS_FOLDER = "shaders/effects"; inline const std::string FONT_DEFAULT = "normal"; + +inline const float AVG_ALPHA = 0.1; +inline const float AVG_BETA = 0.01; \ No newline at end of file diff --git a/src/frontend/debug_panel.cpp b/src/frontend/debug_panel.cpp index 80f4904ee..12af68a2b 100644 --- a/src/frontend/debug_panel.cpp +++ b/src/frontend/debug_panel.cpp @@ -1,3 +1,4 @@ +#include "constants.hpp" #include "audio/audio.hpp" #include "delegates.hpp" #include "engine/Engine.hpp" @@ -74,8 +75,6 @@ std::shared_ptr create_debug_panel( static int fpsMaxOld = fpsMax; static float fpsAvgFast = fps; static float fpsAvgLong = fps; - static float fpsAvgAlpha = 0.1; - static float fpsAvgBeta = 0.01; static std::wstring fpsString = L""; static size_t lastTotalDownload = 0; @@ -86,8 +85,8 @@ std::shared_ptr create_debug_panel( fps = 1.0f / engine.getTime().getDelta(); fpsMin = std::min(fps, fpsMin); fpsMax = std::max(fps, fpsMax); - fpsAvgFast = fpsAvgFast * (1 - fpsAvgAlpha) + fps * fpsAvgAlpha; - fpsAvgLong = fpsAvgLong * (1 - fpsAvgBeta) + fps * fpsAvgBeta; + fpsAvgFast = fpsAvgFast * (1 - AVG_ALPHA) + fps * AVG_ALPHA; + fpsAvgLong = fpsAvgLong * (1 - AVG_BETA) + fps * AVG_BETA; }); panel->listenInterval(2.0f, []() {