diff --git a/code/intermediate/tutorial12-camera/Cargo.toml b/code/intermediate/tutorial12-camera/Cargo.toml index 39ffeff2..f0666f5c 100644 --- a/code/intermediate/tutorial12-camera/Cargo.toml +++ b/code/intermediate/tutorial12-camera/Cargo.toml @@ -14,10 +14,10 @@ image = "0.23" log = "0.4" tobj = "2.0" wgpu = "0.6" -winit = "0.22" +winit = "0.23" [build-dependencies] anyhow = "1.0" fs_extra = "1.2" glob = "0.3" -shaderc = "0.6" \ No newline at end of file +shaderc = "0.6" diff --git a/code/intermediate/tutorial12-camera/src/camera.rs b/code/intermediate/tutorial12-camera/src/camera.rs index 105161a2..98fb8ec6 100644 --- a/code/intermediate/tutorial12-camera/src/camera.rs +++ b/code/intermediate/tutorial12-camera/src/camera.rs @@ -1,7 +1,7 @@ use cgmath::*; use std::f32::consts::FRAC_PI_2; use std::time::Duration; -use winit::dpi::LogicalPosition; +use winit::dpi::PhysicalPosition; use winit::event::*; #[rustfmt::skip] @@ -143,7 +143,7 @@ impl CameraController { self.scroll = match delta { // I'm assuming a line is about 100 pixels MouseScrollDelta::LineDelta(_, scroll) => scroll * 100.0, - MouseScrollDelta::PixelDelta(LogicalPosition { y: scroll, .. }) => *scroll as f32, + MouseScrollDelta::PixelDelta(PhysicalPosition { y: scroll, .. }) => *scroll as f32, }; } diff --git a/code/intermediate/tutorial13-threading/Cargo.toml b/code/intermediate/tutorial13-threading/Cargo.toml index d4f7d8c1..b1478aa0 100644 --- a/code/intermediate/tutorial13-threading/Cargo.toml +++ b/code/intermediate/tutorial13-threading/Cargo.toml @@ -15,11 +15,11 @@ log = "0.4" rayon = "1.4" # NEW! tobj = "2.0" wgpu = "0.6" -winit = "0.22" +winit = "0.23" [build-dependencies] anyhow = "1.0" fs_extra = "1.2" glob = "0.3" rayon = "1.4" # NEW! -shaderc = "0.6" \ No newline at end of file +shaderc = "0.6" diff --git a/code/intermediate/tutorial13-threading/src/camera.rs b/code/intermediate/tutorial13-threading/src/camera.rs index d1bb6e5d..3c228ff6 100644 --- a/code/intermediate/tutorial13-threading/src/camera.rs +++ b/code/intermediate/tutorial13-threading/src/camera.rs @@ -1,7 +1,7 @@ use cgmath::*; use std::f32::consts::FRAC_PI_2; use std::time::Duration; -use winit::dpi::LogicalPosition; +use winit::dpi::PhysicalPosition; use winit::event::*; #[rustfmt::skip] @@ -143,7 +143,7 @@ impl CameraController { self.scroll = -match delta { // I'm assuming a line is about 100 pixels MouseScrollDelta::LineDelta(_, scroll) => scroll * 100.0, - MouseScrollDelta::PixelDelta(LogicalPosition { y: scroll, .. }) => *scroll as f32, + MouseScrollDelta::PixelDelta(PhysicalPosition { y: scroll, .. }) => *scroll as f32, }; } diff --git a/code/showcase/framework/src/camera.rs b/code/showcase/framework/src/camera.rs index 365491df..e4f4848c 100644 --- a/code/showcase/framework/src/camera.rs +++ b/code/showcase/framework/src/camera.rs @@ -1,7 +1,7 @@ use cgmath::*; use std::f32::consts::FRAC_PI_2; use std::time::Duration; -use winit::dpi::LogicalPosition; +use winit::dpi::PhysicalPosition; use winit::event::*; #[cfg_attr(rustfmt, rustfmt_skip)] @@ -157,7 +157,7 @@ impl CameraController { self.scroll = -match delta { // I'm assuming a line is about 100 pixels MouseScrollDelta::LineDelta(_, scroll) => scroll * 100.0, - MouseScrollDelta::PixelDelta(LogicalPosition { y: scroll, .. }) => *scroll as f32, + MouseScrollDelta::PixelDelta(PhysicalPosition { y: scroll, .. }) => *scroll as f32, }; } diff --git a/docs/intermediate/tutorial12-camera/README.md b/docs/intermediate/tutorial12-camera/README.md index 9e460bac..520eaf67 100644 --- a/docs/intermediate/tutorial12-camera/README.md +++ b/docs/intermediate/tutorial12-camera/README.md @@ -7,7 +7,7 @@ I've been putting this off for a while. Implementing a camera isn't specifically ```rust use cgmath::*; use winit::event::*; -use winit::dpi::LogicalPosition; +use winit::dpi::PhysicalPosition; use std::time::Duration; use std::f32::consts::FRAC_PI_2; @@ -184,7 +184,7 @@ impl CameraController { self.scroll = -match delta { // I'm assuming a line is about 100 pixels MouseScrollDelta::LineDelta(_, scroll) => scroll * 100.0, - MouseScrollDelta::PixelDelta(LogicalPosition { + MouseScrollDelta::PixelDelta(PhysicalPosition { y: scroll, .. }) => *scroll as f32, @@ -409,4 +409,4 @@ With that we should be able to move our camera wherever we want. ![./screenshot.png](./screenshot.png) - \ No newline at end of file +