Skip to content

Commit

Permalink
On Windows, fix reported cursor position. (#2311)
Browse files Browse the repository at this point in the history
When clicking and moving the cursor out of the window negative coordinates were not handled correctly.
  • Loading branch information
msiglreith authored Jun 2, 2022
1 parent 5d85c10 commit 58cd23d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/platform_impl/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ const fn get_xbutton_wparam(x: u32) -> u16 {
}

#[inline(always)]
const fn get_x_lparam(x: u32) -> u16 {
loword(x)
const fn get_x_lparam(x: u32) -> i16 {
loword(x) as _
}

#[inline(always)]
const fn get_y_lparam(x: u32) -> u16 {
hiword(x)
const fn get_y_lparam(x: u32) -> i16 {
hiword(x) as _
}

#[inline(always)]
Expand Down

0 comments on commit 58cd23d

Please sign in to comment.