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 authored and GitHub committed 2022-06-02 19:08:54 +02:00
1 parent 5d85c10a2c
commit 58cd23d1ac
1 file changed
+4 -4
+4 -4
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)]