///////////////////////////////////////////////////////
| 839 | |
| 840 | //////////////////////////////////////////////////////////// |
| 841 | JoystickCaps JoystickImpl::getCapabilitiesDInput() const |
| 842 | { |
| 843 | JoystickCaps caps; |
| 844 | |
| 845 | // Count how many buttons have valid offsets |
| 846 | caps.buttonCount = 0; |
| 847 | |
| 848 | for (const int button : m_buttons) |
| 849 | { |
| 850 | if (button != -1) |
| 851 | ++caps.buttonCount; |
| 852 | } |
| 853 | |
| 854 | // Check which axes have valid offsets |
| 855 | for (unsigned int i = 0; i < Joystick::AxisCount; ++i) |
| 856 | { |
| 857 | const auto axis = static_cast<Joystick::Axis>(i); |
| 858 | caps.axes[axis] = (m_axes[axis] != -1); |
| 859 | } |
| 860 | |
| 861 | return caps; |
| 862 | } |
| 863 | |
| 864 | |
| 865 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no outgoing calls
no test coverage detected