Actually check that PumpDevices have the correct vid/pid.

This commit is contained in:
Steve Checkoway
2007-01-18 07:18:41 +00:00
parent 0e43d2fe35
commit 44baf35a73
5 changed files with 11 additions and 6 deletions
@@ -121,16 +121,17 @@ void JoystickDevice::Open()
}
}
void JoystickDevice::InitDevice( int vid, int pid )
bool JoystickDevice::InitDevice( int vid, int pid )
{
if( vid != 0x0507 || pid != 0x0011 )
return;
return true;
// It's a Para controller so try to power it on.
uint8_t powerOn = 1;
IOReturn ret = SetReport( kIOHIDReportTypeFeature, 0, &powerOn, 1, 10 );
if( ret )
LOG->Warn( "Failed to power on the Para controller: %#08x", ret );
return ret == kIOReturnSuccess;
}
void JoystickDevice::GetButtonPresses( vector<DeviceInput>& vPresses, int cookie, int value, const RageTimer& now ) const