more mousewheel stuff
This commit is contained in:
@@ -509,18 +509,21 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
|
|||||||
switch(in.ofs)
|
switch(in.ofs)
|
||||||
{
|
{
|
||||||
case DIMOFS_X:
|
case DIMOFS_X:
|
||||||
up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT;
|
|
||||||
INPUTFILTER->UpdateCursorLocation((float)cursorPos.x,(float)cursorPos.y);
|
INPUTFILTER->UpdateCursorLocation((float)cursorPos.x,(float)cursorPos.y);
|
||||||
break;
|
break;
|
||||||
case DIMOFS_Y:
|
case DIMOFS_Y:
|
||||||
up = MOUSE_Y_UP; down = MOUSE_Y_DOWN;
|
|
||||||
INPUTFILTER->UpdateCursorLocation((float)cursorPos.x,(float)cursorPos.y);
|
INPUTFILTER->UpdateCursorLocation((float)cursorPos.x,(float)cursorPos.y);
|
||||||
break;
|
break;
|
||||||
case DIMOFS_Z:
|
case DIMOFS_Z:
|
||||||
|
INPUTFILTER->UpdateMouseWheel(l);
|
||||||
|
{
|
||||||
up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN;
|
up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN;
|
||||||
l = SCALE( int(evtbuf[i].dwData), -120.0f, 120.0f, -1.0f, 1.0f );
|
l = SCALE( int(evtbuf[i].dwData), -120.0f, 120.0f, 1.0f, -1.0f );
|
||||||
ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) );
|
DeviceInput diUp = DeviceInput(dev, up, max(-l,0), tm);
|
||||||
ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) );
|
DeviceInput diDown = DeviceInput(dev, down, max(+l,0), tm);
|
||||||
|
ButtonPressed( diUp );
|
||||||
|
ButtonPressed( diDown );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default: LOG->MapLog( "unknown input",
|
default: LOG->MapLog( "unknown input",
|
||||||
"Mouse '%s' is returning an unknown mouse offset [axis], %i",
|
"Mouse '%s' is returning an unknown mouse offset [axis], %i",
|
||||||
@@ -552,6 +555,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case in.HAT:
|
case in.HAT:
|
||||||
{
|
{
|
||||||
const int pos = TranslatePOV( evtbuf[i].dwData );
|
const int pos = TranslatePOV( evtbuf[i].dwData );
|
||||||
|
|||||||
Reference in New Issue
Block a user