mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 05:10:03 -04:00
Merge pull request #405 from tomaka/win32-wheel
[Breaking change] Fix mouse wheel value on win32 and return a f64 instead of i32 in the MouseWheel event
This commit is contained in:
@@ -114,8 +114,9 @@ pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT,
|
||||
|
||||
let value = (wparam >> 16) as i16;
|
||||
let value = value as i32;
|
||||
let value = value as f64 / winapi::WHEEL_DELTA as f64;
|
||||
|
||||
send_event(window, MouseWheel(value));
|
||||
send_event(window, MouseWheel(0.0, value));
|
||||
|
||||
0
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user