Route platform frame hooks through services
This commit is contained in:
13
src/app.cpp
13
src/app.cpp
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user