summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-07-13 16:01:46 +0200
committerHampusM <hampus@hampusmat.com>2026-07-13 16:01:46 +0200
commitd683ad12636f4069cc73c4d69cdbdf85cc9b4099 (patch)
tree5d1f93e4c4f3e65d287d0fa70bbcba4ed094cb34 /engine
parentfda9411a1f3f4d4870a8d7e508eb1ac030a1b658 (diff)
fix(engine): stop clearing absolute mouse pos every tickHEADmaster
Diffstat (limited to 'engine')
-rw-r--r--engine/src/windowing.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/engine/src/windowing.rs b/engine/src/windowing.rs
index dc378fa..36941cf 100644
--- a/engine/src/windowing.rs
+++ b/engine/src/windowing.rs
@@ -169,7 +169,13 @@ fn update_stuff(
return Ok(());
};
- std::mem::take(&mut *input)
+ let new_input = Input {
+ relative_mouse_pos_delta: Vec2 { x: 0.0, y: 0.0 },
+ absolute_mouse_pos: input.absolute_mouse_pos.clone(),
+ mouse_scroll_delta: MouseScrollDelta { vert_lines: 0.0, hor_lines: 0.0 },
+ };
+
+ std::mem::replace(&mut *input, new_input)
};
mouse.curr_tick_position_delta = input.relative_mouse_pos_delta;