Skip to content

Commit 5dacbf6

Browse files
luksladkyandrewfb
authored andcommitted
Fixed incorrect mouseWheel position on Windows with HiDPI display
1 parent bebca29 commit 5dacbf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cinder/app/msw/AppImplMsw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ LRESULT CALLBACK WndProc( HWND mWnd, // Handle For This Window
906906
case WM_MOUSEWHEEL: {
907907
POINT pt = { ((int)(short)LOWORD(lParam)), ((int)(short)HIWORD(lParam)) };
908908
::MapWindowPoints( NULL, mWnd, &pt, 1 );
909-
MouseEvent event( impl->getWindow(), 0, int(impl->getContentScale() * pt.x), int(impl->getContentScale() * pt.y), prepMouseEventModifiers( wParam ),
909+
MouseEvent event( impl->getWindow(), 0, impl->toPoints(pt.x), impl->toPoints(pt.y), prepMouseEventModifiers( wParam ),
910910
GET_WHEEL_DELTA_WPARAM( wParam ) / 120.0f, static_cast<unsigned int>( wParam ) );
911911
impl->getWindow()->emitMouseWheel( &event );
912912
}

0 commit comments

Comments
 (0)