actually hook up set_frame_interval to FilamentViewer

This commit is contained in:
Nick Fisher
2024-05-09 13:37:01 +08:00
parent f8db54e941
commit 87213e8aac
2 changed files with 5 additions and 2 deletions

View File

@@ -277,9 +277,12 @@ extern "C"
}
FLUTTER_PLUGIN_EXPORT void
set_frame_interval_ffi(float frameIntervalInMilliseconds)
set_frame_interval_ffi(void* const viewer, float frameIntervalInMilliseconds)
{
_rl->setFrameIntervalInMilliseconds(frameIntervalInMilliseconds);
std::packaged_task<void()> lambda([=]() mutable
{ ((FilamentViewer*)viewer)->setFrameInterval(frameIntervalInMilliseconds); });
auto fut = _rl->add_task(lambda);
}
FLUTTER_PLUGIN_EXPORT void render_ffi(void *const viewer)