(web) after capture is called on emscripten builds, request the render thread to exit/resume to yield to the browser so the frame is committed

This commit is contained in:
Nick Fisher
2025-06-23 12:43:40 +08:00
parent e27be37378
commit d41f29c06d

View File

@@ -350,7 +350,13 @@ extern "C"
[=]() mutable
{
Engine_execute(tEngine);
PROXY(onComplete(requestId));
std::packaged_task<void()> callback(
[=]() mutable
{
PROXY(onComplete(requestId));
});
_renderThread->add_task(callback);
_renderThread->restart();
});
auto fut = _renderThread->add_task(lambda);
}