mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
On Windows, fix reported cursor position. (#2311)
When clicking and moving the cursor out of the window negative coordinates were not handled correctly.
This commit is contained in:
parent
5d85c10a2c
commit
58cd23d1ac
|
@ -106,13 +106,13 @@ const fn get_xbutton_wparam(x: u32) -> u16 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
const fn get_x_lparam(x: u32) -> u16 {
|
const fn get_x_lparam(x: u32) -> i16 {
|
||||||
loword(x)
|
loword(x) as _
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
const fn get_y_lparam(x: u32) -> u16 {
|
const fn get_y_lparam(x: u32) -> i16 {
|
||||||
hiword(x)
|
hiword(x) as _
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|
Loading…
Reference in a new issue