From 467d6ee74e9cb067ffbeb212cbf1f2e753e9c485 Mon Sep 17 00:00:00 2001 From: cfy Date: Fri, 16 May 2025 21:42:26 +0800 Subject: [PATCH] fix issue 25: mouse coordinates are always returned as 0 in release building mode --- src/sys/windows.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys/windows.rs b/src/sys/windows.rs index 7bfe761..f92097c 100644 --- a/src/sys/windows.rs +++ b/src/sys/windows.rs @@ -113,7 +113,7 @@ impl Mouse { pub fn get_position(&self) -> Result> { let mut pos: POINT = POINT { x: 0, y: 0 }; unsafe { - let get_cursor_pos: libloading::Symbol bool> = + let get_cursor_pos: libloading::Symbol bool> = self.user32.get(b"GetCursorPos")?; get_cursor_pos(&mut pos); Ok(pos.into())