mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 06:30:19 +00:00
Create winit windows before app.initialize() (#916)
This is required so startup systems have access to Windows and WinitWindows resources.
This commit is contained in:
parent
b2c82955ff
commit
fd6b787efc
1 changed files with 8 additions and 0 deletions
|
@ -155,6 +155,14 @@ pub fn winit_runner(mut app: App) {
|
||||||
|
|
||||||
app.resources.insert_thread_local(event_loop.create_proxy());
|
app.resources.insert_thread_local(event_loop.create_proxy());
|
||||||
|
|
||||||
|
// Create Windows and WinitWindows resources, so startup systems
|
||||||
|
// in below app.initialize() have access to them.
|
||||||
|
handle_create_window_events(
|
||||||
|
&mut app.resources,
|
||||||
|
&event_loop,
|
||||||
|
&mut create_window_event_reader,
|
||||||
|
);
|
||||||
|
|
||||||
app.initialize();
|
app.initialize();
|
||||||
|
|
||||||
trace!("Entering winit event loop");
|
trace!("Entering winit event loop");
|
||||||
|
|
Loading…
Reference in a new issue