Merge 97437dad18
into ebf6bf6ea9
This commit is contained in:
commit
5d0a4dd404
@ -19,6 +19,7 @@ extern crate alloc;
|
|||||||
|
|
||||||
use alloc::sync::Arc;
|
use alloc::sync::Arc;
|
||||||
|
|
||||||
|
use bevy_ecs::system::Commands;
|
||||||
use bevy_platform::sync::Mutex;
|
use bevy_platform::sync::Mutex;
|
||||||
|
|
||||||
mod event;
|
mod event;
|
||||||
@ -130,14 +131,16 @@ impl Plugin for WindowPlugin {
|
|||||||
.add_event::<AppLifecycle>();
|
.add_event::<AppLifecycle>();
|
||||||
|
|
||||||
if let Some(primary_window) = &self.primary_window {
|
if let Some(primary_window) = &self.primary_window {
|
||||||
let mut entity_commands = app.world_mut().spawn(primary_window.clone());
|
let primary_window = primary_window.clone();
|
||||||
entity_commands.insert((
|
let primary_cursor_options = self.primary_cursor_options.clone().unwrap_or_default();
|
||||||
PrimaryWindow,
|
app.add_systems(PreStartup, move |mut commands: Commands| {
|
||||||
RawHandleWrapperHolder(Arc::new(Mutex::new(None))),
|
commands.spawn((
|
||||||
));
|
primary_window.clone(),
|
||||||
if let Some(primary_cursor_options) = &self.primary_cursor_options {
|
PrimaryWindow,
|
||||||
entity_commands.insert(primary_cursor_options.clone());
|
RawHandleWrapperHolder(Arc::new(Mutex::new(None))),
|
||||||
}
|
primary_cursor_options.clone(),
|
||||||
|
));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
match self.exit_condition {
|
match self.exit_condition {
|
||||||
|
Loading…
Reference in New Issue
Block a user