diff options
author | crupest <crupest@outlook.com> | 2021-05-12 08:57:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-12 08:57:45 +0800 |
commit | 1497b881c6d13c5e037dcd57988029df0b0e50eb (patch) | |
tree | 5f89c071cdb7c891d5afb35c49e3a337418bf026 /src/win/gui/Window.cpp | |
parent | 02baef645090f0514fa14b43aecf954fd55257dc (diff) | |
download | cru-1497b881c6d13c5e037dcd57988029df0b0e50eb.tar.gz cru-1497b881c6d13c5e037dcd57988029df0b0e50eb.tar.bz2 cru-1497b881c6d13c5e037dcd57988029df0b0e50eb.zip |
...
Diffstat (limited to 'src/win/gui/Window.cpp')
-rw-r--r-- | src/win/gui/Window.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/win/gui/Window.cpp b/src/win/gui/Window.cpp index efd3bfcc..4c75a319 100644 --- a/src/win/gui/Window.cpp +++ b/src/win/gui/Window.cpp @@ -438,8 +438,9 @@ void WinNativeWindow::OnMouseUpInternal(platform::gui::MouseButton button, } void WinNativeWindow::OnMouseWheelInternal(short delta, POINT point) { - CRU_UNUSED(delta) - CRU_UNUSED(point) + const auto dip_point = PixelToDip(point); + const float d = -((float)delta / 120.f); + mouse_wheel_event_.Raise({d, dip_point, RetrieveKeyMofifier()}); } void WinNativeWindow::OnKeyDownInternal(int virtual_code) { |