From 90378e0aa24eb0b1d2e8038753f685846354e26b Mon Sep 17 00:00:00 2001 From: SDesya74 Date: Sun, 18 Feb 2024 23:36:45 +0300 Subject: [PATCH] Fix Steam overlay flickering somehow --- crates/bevy_render/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 045119267e94d..159b1e8434374 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -302,14 +302,10 @@ impl Plugin for RenderPlugin { RenderInstance(Arc::new(instance)), )); }; - // In wasm, spawn a task and detach it for execution - #[cfg(target_arch = "wasm32")] + bevy_tasks::IoTaskPool::get() .spawn_local(async_renderer) .detach(); - // Otherwise, just block for it to complete - #[cfg(not(target_arch = "wasm32"))] - futures_lite::future::block_on(async_renderer); // SAFETY: Plugins should be set up on the main thread. unsafe { initialize_render_app(app) };