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
					
				| @ -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 New Issue
	
	Block a user
	 Tomasz Sterna
						Tomasz Sterna