CDevice::CDevice(const ADDON::Joystick& joystick)
 : m_strName(joystick.Name()),
   m_strProvider(joystick.Provider()),
   m_vid(joystick.VendorID()),
   m_pid(joystick.ProductID()),
   m_buttonCount(joystick.ButtonCount()),
   m_hatCount(joystick.HatCount()),
   m_axisCount(joystick.AxisCount())
{
}
Beispiel #2
0
void CPeripheralAddon::SetJoystickInfo(CPeripheralJoystick& joystick, const ADDON::Joystick& joystickInfo)
{
  joystick.SetProvider(joystickInfo.Provider());
  joystick.SetRequestedPort(joystickInfo.RequestedPort());
  joystick.SetButtonCount(joystickInfo.ButtonCount());
  joystick.SetHatCount(joystickInfo.HatCount());
  joystick.SetAxisCount(joystickInfo.AxisCount());
  joystick.SetMotorCount(joystickInfo.MotorCount());
  joystick.SetSupportsPowerOff(joystickInfo.SupportsPowerOff());
}