Route platform frame hooks through services
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user