From 1737727d613b314bc46be9dcb6179f35cefb5077 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Sun, 12 May 2024 15:07:29 +0200 Subject: [PATCH] fix cast --- src/capture/windows.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/capture/windows.rs b/src/capture/windows.rs index bac84ae4..8cba14a7 100644 --- a/src/capture/windows.rs +++ b/src/capture/windows.rs @@ -141,7 +141,7 @@ fn to_mouse_event(wparam: WPARAM, lparam: LPARAM) -> Option { }, WPARAM(p) if p == WM_MOUSEWHEEL as usize => Some(PointerEvent::AxisDiscrete120 { axis: 0, - value: -((mouse_low_level.mouseData >> 16) as i32), + value: -(mouse_low_level.mouseData as i32 >> 16), }), WPARAM(p) if p == WM_XBUTTONDOWN as usize || p == WM_XBUTTONUP as usize => { let hb = mouse_low_level.mouseData >> 16;