From fcdd5bcddd80d6f7e98e9ba0e676a9a8ed18ebea Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 14 May 2011 23:49:32 -0500 Subject: [PATCH 1/3] cleanup --- src/ModIconRow.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ModIconRow.h b/src/ModIconRow.h index 09654142d0..47c8a94ad8 100644 --- a/src/ModIconRow.h +++ b/src/ModIconRow.h @@ -22,9 +22,7 @@ public: virtual void HandleMessage( const Message &msg ); - // // Commands - // virtual void PushSelf( lua_State *L ); protected: From c8b3a1338b1e4d0e25e43ed4dd4795c09169d898 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 15 May 2011 00:01:38 -0500 Subject: [PATCH 2/3] 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", From 2724e35e971b44785cbdb43c78bae3063c59e69d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 15 May 2011 00:01:45 -0500 Subject: [PATCH 3/3] commenting --- src/archutils/Win32/GraphicsWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/archutils/Win32/GraphicsWindow.cpp b/src/archutils/Win32/GraphicsWindow.cpp index cb2b128d71..44314367e0 100644 --- a/src/archutils/Win32/GraphicsWindow.cpp +++ b/src/archutils/Win32/GraphicsWindow.cpp @@ -136,7 +136,7 @@ static LRESULT CALLBACK GraphicsWindow_WndProc( HWND hWnd, UINT msg, WPARAM wPar case WM_KEYUP: case WM_SYSKEYDOWN: case WM_SYSKEYUP: - case WM_MOUSEWHEEL: + case WM_MOUSEWHEEL: // might want to use this for GET_WHEEL_DELTA_WPARAM(wParam) -aj // We handle all input ourself, via DirectInput. return 0;