fix headless_renderer example exiting immediately

This commit is contained in:
tigregalis 2025-01-08 13:00:41 +08:00
parent 3396f812ef
commit c4672a34d2

View File

@ -29,6 +29,7 @@ use bevy::{
renderer::{RenderContext, RenderDevice, RenderQueue},
Extract, Render, RenderApp, RenderSystems,
},
window::ExitCondition,
winit::WinitPlugin,
};
use crossbeam_channel::{Receiver, Sender};
@ -92,7 +93,7 @@ fn main() {
primary_window: None,
// Dont automatically exit due to having no windows.
// Instead, the code in `update()` will explicitly produce an `AppExit` event.
exit_condition: bevy::window::ExitCondition::DontExit,
exit_condition: ExitCondition::DontExit,
..default()
})
// WinitPlugin will panic in environments without a display server.