From c8b3a1338b1e4d0e25e43ed4dd4795c09169d898 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 15 May 2011 00:01:38 -0500 Subject: [PATCH] mouse input is working slightly better... --- .../InputHandler/InputHandler_DirectInput.cpp | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index a0a9316e64..4fb78dee35 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -529,11 +529,28 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm INPUTFILTER->UpdateMouseWheel(l); { up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN; - l = SCALE( int(evtbuf[i].dwData), -WHEEL_DELTA, WHEEL_DELTA, 1.0f, -1.0f ); - DeviceInput diUp = DeviceInput(dev, up, max(-l,0), tm); - DeviceInput diDown = DeviceInput(dev, down, max(+l,0), tm); - ButtonPressed( diUp ); - ButtonPressed( diDown ); + //l = SCALE( int(evtbuf[i].dwData), -WHEEL_DELTA, WHEEL_DELTA, 1.0f, -1.0f ); + if( int(evtbuf[i].dwData) > 0 ) + { + DeviceInput diUp = DeviceInput(dev, up, 1, tm); + ButtonPressed( diUp ); + DeviceInput diDown = DeviceInput(dev, down, 0, tm); + ButtonPressed( diDown ); + } + else if( int(evtbuf[i].dwData) < 0 ) + { + DeviceInput diDown = DeviceInput(dev, down, 1, tm); + ButtonPressed( diDown ); + DeviceInput diUp = DeviceInput(dev, up, 0, tm); + ButtonPressed( diUp ); + } + else + { + DeviceInput diUp = DeviceInput(dev, up, 0, tm); + ButtonPressed( diUp ); + DeviceInput diDown = DeviceInput(dev, down, 0, tm); + ButtonPressed( diDown ); + } } break; default: LOG->MapLog( "unknown input",