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:
Markus Siglreithmaier 2022-06-02 19:08:54 +02:00 committed by GitHub
parent 5d85c10a2c
commit 58cd23d1ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)]