Route platform frame hooks through services

This commit is contained in:
2026-06-03 04:41:01 +02:00
parent 22006eaf47
commit dd641c047b
10 changed files with 85 additions and 16 deletions

View File

@@ -1123,10 +1123,7 @@ void App::ui_thread_main()
float dt = std::chrono::duration<float>(t_now - t_start).count();
t_start = t_now;
#ifdef _WIN32
extern void win32_update_stylus(float dt);
win32_update_stylus(dt);
#endif
update_platform_frame(dt);
// increment timers
t_frame += dt;
@@ -1134,13 +1131,7 @@ void App::ui_thread_main()
if (t_fps_counter > 1.f)
{
#ifdef _WIN32
extern void win32_update_fps(int frames);
win32_update_fps(rendered_frames);
#elif __LINUX__
extern void linux_update_fps(int frames);
linux_update_fps(rendered_frames);
#endif
report_rendered_frames(rendered_frames);
t_fps_counter = 0;
rendered_frames = 0;
}