コード例 #1
0
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())
{
}
コード例 #2
0
ファイル: PeripheralAddon.cpp プロジェクト: aerickson/xbmc
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());
}