From 42aaa6d1b142123e244d2c7d3204582c994ebe3f Mon Sep 17 00:00:00 2001 From: shadow cat Date: Wed, 5 Jun 2024 00:11:12 -0400 Subject: [PATCH] forgot to divide by 2 --- src/client/handle_input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/handle_input.rs b/src/client/handle_input.rs index aabe75a..b4a110f 100644 --- a/src/client/handle_input.rs +++ b/src/client/handle_input.rs @@ -27,7 +27,7 @@ impl Client<'_> { if self.grabbed_cursor { if let Some(window) = &self.window { let size = window.inner_size(); - window.set_cursor_position(LogicalPosition::new(size.width, size.height)).expect("wah"); + window.set_cursor_position(LogicalPosition::new(size.width / 2, size.height / 2)).expect("wah"); } let delta = input.mouse_delta; if delta.x != 0.0 {