///////////////////////////////////////////////////////
| 364 | |
| 365 | //////////////////////////////////////////////////////////// |
| 366 | JoystickCaps JoystickImpl::getCapabilities() const |
| 367 | { |
| 368 | const AutoreleasePool pool; |
| 369 | JoystickCaps caps; |
| 370 | |
| 371 | // Buttons: |
| 372 | caps.buttonCount = static_cast<unsigned int>(m_buttons.size()); |
| 373 | |
| 374 | // Axis: |
| 375 | for (const auto& [axis, iohidElementRef] : m_axis) |
| 376 | caps.axes[axis] = true; |
| 377 | |
| 378 | if (m_hat != nullptr) |
| 379 | caps.axes[Joystick::Axis::PovX] = caps.axes[Joystick::Axis::PovY] = true; |
| 380 | |
| 381 | return caps; |
| 382 | } |
| 383 | |
| 384 | |
| 385 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no outgoing calls
no test coverage detected