From e01def85ec89c962909a50373bf6f768234b88dc Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 23 Feb 2011 20:39:51 -0600 Subject: [PATCH] attempt to make mouse x/y work --- src/archutils/Darwin/MouseDevice.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/archutils/Darwin/MouseDevice.cpp b/src/archutils/Darwin/MouseDevice.cpp index 7a00e61522..6f597e066b 100644 --- a/src/archutils/Darwin/MouseDevice.cpp +++ b/src/archutils/Darwin/MouseDevice.cpp @@ -104,15 +104,17 @@ void MouseDevice::GetButtonPresses( vector& vPresses, IOHIDElementC const Mouse& m = m_Mouse; if( m.x_axis == cookie ) { - float level = SCALE( value, m.x_min, m.x_max, -1.0f, 1.0f ); + INPUTFILTER->UpdateCursorLocation((float)m.x_axis,(float)m.y_axis); } else if( m.y_axis == cookie ) { - float level = SCALE( value, m.x_min, m.x_max, -1.0f, 1.0f ); + INPUTFILTER->UpdateCursorLocation((float)m.x_axis,(float)m.y_axis); } else if( m.z_axis == cookie ) { float level = SCALE( value, m.z_min, m.z_max, -1.0f, 1.0f ); + ButtonPressed( DeviceInput(DEVICE_MOUSE, MOUSE_WHEELUP, max(-l,0), now) ); + ButtonPressed( DeviceInput(DEVICE_MOUSE, MOUSE_WHEELDOWN, max(+l,0), now) ); } else {