treat WM_MOUSEMOVE coordinates as i16 to handle negative coordinates properly
This commit is contained in:
parent
cc6ead3669
commit
d138cfaccf
|
@ -71,8 +71,8 @@ unsafe extern "system" fn wnd_proc(
|
||||||
|
|
||||||
match msg {
|
match msg {
|
||||||
WM_MOUSEMOVE => {
|
WM_MOUSEMOVE => {
|
||||||
let x = (lparam & 0xFFFF) as i32;
|
let x = (lparam & 0xFFFF) as i16 as i32;
|
||||||
let y = ((lparam >> 16) & 0xFFFF) as i32;
|
let y = ((lparam >> 16) & 0xFFFF) as i16 as i32;
|
||||||
|
|
||||||
let physical_pos = PhyPoint { x, y };
|
let physical_pos = PhyPoint { x, y };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue