@@ -403,14 +403,6 @@ pub fn resize(
403403 let width = width. max ( 1 ) ;
404404 let height = height. max ( 1 ) ;
405405
406- // let Ok(window) = windows.get_mut(window_entity) else {
407- // return Ok(());
408- // };
409- //
410- // if window.mode != WindowMode::Windowed {
411- // return Ok(());
412- // }
413-
414406 if let Ok ( mut window) = windows. get_mut ( window_entity) {
415407 let scale = window. resolution . scale_factor ( ) ;
416408 let physical_w = ( width as f32 * scale) as u32 ;
@@ -420,16 +412,16 @@ pub fn resize(
420412 . set_physical_resolution ( physical_w, physical_h) ;
421413 }
422414
423- // for (target, mut surface_size, mut projection) in graphics_query.iter_mut() {
424- // if let RenderTarget::Window(WindowRef::Entity(surface)) = *target {
425- // if surface == window_entity {
426- // *surface_size = SurfaceSize(width, height);
427- // if let Projection::Custom(ref mut custom) = *projection {
428- // custom.update(width as f32, height as f32);
429- // }
430- // }
431- // }
432- // }
415+ for ( target, mut surface_size, mut projection) in graphics_query. iter_mut ( ) {
416+ if let RenderTarget :: Window ( WindowRef :: Entity ( surface) ) = * target {
417+ if surface == window_entity {
418+ * surface_size = SurfaceSize ( width, height) ;
419+ if let Projection :: Custom ( ref mut custom) = * projection {
420+ custom. update ( width as f32 , height as f32 ) ;
421+ }
422+ }
423+ }
424+ }
433425 Ok ( ( ) )
434426}
435427
0 commit comments