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

@@ -13,6 +13,7 @@ bool android_set_clipboard(const std::string& s);
#elif __APPLE__
#elif __LINUX__
#include <tinyfiledialogs.h>
void linux_update_fps(int frames);
#elif __WEB__
void webgl_pick_file(std::function<void(std::string)> callback);
void webgl_pick_file_save(
@@ -87,6 +88,20 @@ public:
#endif
}
void update_platform_frame(float delta_time_seconds) override
{
(void)delta_time_seconds;
}
void report_rendered_frames(int frames) override
{
#ifdef __LINUX__
linux_update_fps(frames);
#else
(void)frames;
#endif
}
void pick_image(pp::platform::PickedPathCallback callback) override
{
#ifdef __IOS__