///////////////////////////////////////////////////////
| 304 | |
| 305 | //////////////////////////////////////////////////////////// |
| 306 | JoystickCaps JoystickImpl::getCapabilities() const |
| 307 | { |
| 308 | if (directInput) |
| 309 | return getCapabilitiesDInput(); |
| 310 | |
| 311 | JoystickCaps caps; |
| 312 | |
| 313 | caps.buttonCount = std::min(m_caps.wNumButtons, Joystick::ButtonCount); |
| 314 | |
| 315 | caps.axes[Joystick::Axis::X] = true; |
| 316 | caps.axes[Joystick::Axis::Y] = true; |
| 317 | caps.axes[Joystick::Axis::Z] = (m_caps.wCaps & JOYCAPS_HASZ) != 0; |
| 318 | caps.axes[Joystick::Axis::R] = (m_caps.wCaps & JOYCAPS_HASR) != 0; |
| 319 | caps.axes[Joystick::Axis::U] = (m_caps.wCaps & JOYCAPS_HASU) != 0; |
| 320 | caps.axes[Joystick::Axis::V] = (m_caps.wCaps & JOYCAPS_HASV) != 0; |
| 321 | caps.axes[Joystick::Axis::PovX] = (m_caps.wCaps & JOYCAPS_HASPOV) != 0; |
| 322 | caps.axes[Joystick::Axis::PovY] = (m_caps.wCaps & JOYCAPS_HASPOV) != 0; |
| 323 | |
| 324 | return caps; |
| 325 | } |
| 326 | |
| 327 | |
| 328 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no outgoing calls
no test coverage detected