diff --git a/src/window/window_wrapper/mod.rs b/src/window/window_wrapper/mod.rs index 4b449f6..9246afb 100644 --- a/src/window/window_wrapper/mod.rs +++ b/src/window/window_wrapper/mod.rs @@ -236,8 +236,8 @@ impl GlutinWindowWrapper { } let vertical_input_type = match y { - _ if y > 0.0 => Some("up"), - _ if y < 0.0 => Some("down"), + _ if y > 1.8 => Some("up"), + _ if y < -1.8 => Some("down"), _ => None, }; @@ -251,9 +251,9 @@ impl GlutinWindowWrapper { .ok(); } - let horizontal_input_type = match y { - _ if x > 0.0 => Some("right"), - _ if x < 0.0 => Some("left"), + let horizontal_input_type = match x { + _ if x > 1.8 => Some("right"), + _ if x < -1.8 => Some("left"), _ => None, }; @@ -334,7 +334,7 @@ impl GlutinWindowWrapper { .. }, .. - } => self.handle_mouse_wheel(0.0, logical_position.y as f32), + } => self.handle_mouse_wheel(logical_position.x as f32, logical_position.y as f32), Event::WindowEvent { event: WindowEvent::MouseInput {