attempt to make mouse x/y work

This commit is contained in:
AJ Kelly
2011-02-23 20:39:51 -06:00
parent 3ed8b14c47
commit e01def85ec
+4 -2
View File
@@ -104,15 +104,17 @@ void MouseDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementC
const Mouse& m = m_Mouse; const Mouse& m = m_Mouse;
if( m.x_axis == cookie ) 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 ) 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 ) else if( m.z_axis == cookie )
{ {
float level = SCALE( value, m.z_min, m.z_max, -1.0f, 1.0f ); 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 else
{ {