diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-05-06 16:56:24 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-05-06 16:56:24 +0200 |
commit | 119bd6393f5f3b8e1510ba6ab3281c8fb387449f (patch) | |
tree | 05340ea2480ff82440c55bbf968604a44447b0cf /src/api/win32 | |
parent | 2d97e0380feb90aa802bc1e56aad0936eda8cc81 (diff) | |
parent | d9f0d92584af1d76779cb8cb4a70762c889970f5 (diff) | |
download | glutin-119bd6393f5f3b8e1510ba6ab3281c8fb387449f.tar.gz glutin-119bd6393f5f3b8e1510ba6ab3281c8fb387449f.zip |
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
Diffstat (limited to 'src/api/win32')
-rw-r--r-- | src/api/win32/callback.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/win32/callback.rs b/src/api/win32/callback.rs index e852eeb..1ea95a5 100644 --- a/src/api/win32/callback.rs +++ b/src/api/win32/callback.rs @@ -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 }, |