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:
Tomasz Sterna 2020-11-26 02:32:41 +01:00 committed by GitHub
parent b2c82955ff
commit fd6b787efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,14 @@ pub fn winit_runner(mut app: App) {
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();
trace!("Entering winit event loop");