diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-09-13 12:19:06 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-09-13 12:19:06 +0200 |
commit | f31867d2b9e7b916e24683c024764bcc3d326a83 (patch) | |
tree | f67ea7143b5c9882325a3d834799bd620690e3f8 /editor/editor_resource_preview.cpp | |
parent | e3ddf3d44acc4d3f965278d01de6ca7fa3d646d3 (diff) | |
download | redot-engine-f31867d2b9e7b916e24683c024764bcc3d326a83.tar.gz |
EditorResourcePreview: Let loads complete after exit requested
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r-- | editor/editor_resource_preview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 956fdc5cfa..a50b2f3dcc 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -533,8 +533,10 @@ void EditorResourcePreview::stop() { } while (!exited.is_set()) { + // Sync pending work. OS::get_singleton()->delay_usec(10000); - RenderingServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on rendering server + RenderingServer::get_singleton()->sync(); + MessageQueue::get_singleton()->flush(); } thread.wait_to_finish(); |