1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Refactor profiler and related classes

This commit is contained in:
sfan5 2024-04-10 23:56:34 +02:00
parent 5a07f5a652
commit 72eeb9fecb
7 changed files with 133 additions and 132 deletions

View file

@ -1132,9 +1132,11 @@ void Game::run()
FpsControl draw_times;
f32 dtime; // in seconds
/* Clear the profiler */
Profiler::GraphValues dummyvalues;
g_profiler->graphGet(dummyvalues);
// Clear the profiler
{
Profiler::GraphValues dummyvalues;
g_profiler->graphPop(dummyvalues);
}
draw_times.reset();
@ -4229,7 +4231,7 @@ void Game::updateClouds(float dtime)
inline void Game::updateProfilerGraphs(ProfilerGraph *graph)
{
Profiler::GraphValues values;
g_profiler->graphGet(values);
g_profiler->graphPop(values);
graph->put(values);
}