forked from bartvdbraak/blender
Bugfix 7733
New mouse scrollwheels allowing higher precision didn't work in Windows. Code was assuming only value of +120 or -120 were returned.
This commit is contained in:
parent
1ece8b81cb
commit
ec686f581c
@ -54,7 +54,7 @@
|
||||
#define WM_MOUSEWHEEL 0x020A
|
||||
#endif // WM_MOUSEWHEEL
|
||||
#ifndef WHEEL_DELTA
|
||||
#define WHEEL_DELTA 120 /* Value for rolling one detent */
|
||||
#define WHEEL_DELTA 120 /* Value for rolling one detent, (old convention! MS changed it) */
|
||||
#endif // WHEEL_DELTA
|
||||
|
||||
|
||||
@ -479,7 +479,11 @@ GHOST_EventWheel* GHOST_SystemWin32::processWheelEvent(GHOST_IWindow *window, WP
|
||||
{
|
||||
// short fwKeys = LOWORD(wParam); // key flags
|
||||
int zDelta = (short) HIWORD(wParam); // wheel rotation
|
||||
zDelta /= WHEEL_DELTA;
|
||||
|
||||
// zDelta /= WHEEL_DELTA;
|
||||
// temporary fix below: microsoft now has added more precision, making the above division not work
|
||||
if (zDelta <= 0 ) zDelta= -1; else zDelta= 1;
|
||||
|
||||
// short xPos = (short) LOWORD(lParam); // horizontal position of pointer
|
||||
// short yPos = (short) HIWORD(lParam); // vertical position of pointer
|
||||
return new GHOST_EventWheel (getSystem()->getMilliSeconds(), window, zDelta);
|
||||
|
Loading…
Reference in New Issue
Block a user