[default -> splittiming] Round 2. FIGHT!

This commit is contained in:
Jason Felds
2011-05-15 01:02:38 -04:00
3 changed files with 23 additions and 8 deletions
-2
View File
@@ -22,9 +22,7 @@ public:
virtual void HandleMessage( const Message &msg );
//
// Commands
//
virtual void PushSelf( lua_State *L );
protected:
@@ -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",
+1 -1
View File
@@ -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;