diff --git a/src/graphics.rs b/src/graphics.rs index d993258..7b2f8b9 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -875,8 +875,8 @@ impl GraphicsState{ config:&wgpu::SurfaceConfiguration, user_settings:&crate::settings::UserSettings, ) { - self.depth_view = Self::create_depth_texture(config,device); - self.camera.screen_size=glam::uvec2(config.width, config.height); + self.depth_view=Self::create_depth_texture(config,device); + self.camera.screen_size=glam::uvec2(config.width,config.height); self.load_user_settings(user_settings); } pub fn render( diff --git a/src/window.rs b/src/window.rs index e53dc18..f69d8ff 100644 --- a/src/window.rs +++ b/src/window.rs @@ -21,7 +21,7 @@ struct WindowContext<'a>{ impl WindowContext<'_>{ fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition{ - winit::dpi::PhysicalPosition::new(self.screen_size.x as f32/2.0, self.screen_size.y as f32/2.0) + winit::dpi::PhysicalPosition::new(self.screen_size.x as f32/2.0,self.screen_size.y as f32/2.0) } fn window_event(&mut self,time:crate::integer::Time,event: winit::event::WindowEvent) { match event {