From 692fc13863a3d61e3dc7e69fddec7799e0d3f157 Mon Sep 17 00:00:00 2001 From: Schmarni Date: Tue, 1 Jul 2025 10:30:59 +0200 Subject: [PATCH] fix: crash on flatscreen mode exit Signed-off-by: Schmarni --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 84c797a..d6c7923 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,6 +23,7 @@ use bevy::gizmos::GizmoPlugin; use bevy::gltf::GltfPlugin; use bevy::input::InputPlugin; use bevy::pbr::PbrPlugin; +use bevy::render::settings::{Backends, RenderCreation, WgpuSettings}; use bevy::render::{RenderDebugFlags, RenderPlugin}; use bevy::scene::ScenePlugin; use bevy::text::FontLoader; @@ -255,7 +256,13 @@ fn bevy_loop( .add(TerminalCtrlCHandlerPlugin) // bevy_mod_openxr will replace this, TODO: figure out how to mix this with // bevy-dmabuf - .add(RenderPlugin::default()) + .add(RenderPlugin { + render_creation: RenderCreation::Automatic(WgpuSettings { + backends: Some(Backends::VULKAN), + ..Default::default() + }), + ..Default::default() + }) .add(ImagePlugin::default()) .add(CorePipelinePlugin) // theoretically we shouldn't need this because of bevy_sk, but everything is tangled in