Follow the stricter API.

This commit is contained in:
Steve Checkoway
2006-02-10 08:54:22 +00:00
parent b1818e1831
commit 69337c8e0f
@@ -173,9 +173,19 @@ void JoystickDevice::GetButtonPresses( vector<pair<DeviceInput, bool> >& vPresse
int JoystickDevice::AssignIDs( InputDevice startID )
{
if( startID < DEVICE_JOY1 )
{
m_vSticks.clear();
return 0;
}
FOREACH( Joystick, m_vSticks, i )
{
i->id = InputDevice( startID );
if( startID > DEVICE_JOY16 )
{
m_vSticks.erase( i, m_vSticks.end() );
break;
}
i->id = startID;
enum_add( startID, 1 );
}
return m_vSticks.size();