Skip to content

Commit

Permalink
chore: store pointer location as i32
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGlassBlock committed Nov 23, 2023
1 parent b451932 commit d9e9d86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ unsafe fn get_window_handle() -> HWND {
_HWND
}

static _ACTIVE_POINTERS: Lazy<Mutex<HashMap<u32, (usize, usize)>>> =
static _ACTIVE_POINTERS: Lazy<Mutex<HashMap<u32, (i32, i32)>>> =
Lazy::new(|| Mutex::new(HashMap::new()));
const WM_POINTER_LIST: [u32; 7] = [
WM_POINTERDOWN,
Expand All @@ -177,7 +177,7 @@ fn update_pointer(_: HWND, param: WPARAM) {
guard.remove(&ptr_info.pointerId);
} else {
let POINT { x, y } = ptr_info.ptPixelLocation;
guard.insert(ptr_info.pointerId, (x as usize, y as usize));
guard.insert(ptr_info.pointerId, (x, y));
}
drop(guard);
}
Expand Down

0 comments on commit d9e9d86

Please sign in to comment.