MCPcopy Create free account
hub / github.com/SFML/SFML / usageToAxis

Function usageToAxis

src/SFML/Window/NetBSD/JoystickImpl.cpp:138–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138std::optional<sf::Joystick::Axis> usageToAxis(int usage)
139{
140 switch (usage)
141 {
142 case HUG_X:
143 return sf::Joystick::Axis::X;
144 case HUG_Y:
145 return sf::Joystick::Axis::Y;
146 case HUG_Z:
147 return sf::Joystick::Axis::Z;
148 case HUG_RZ:
149 return sf::Joystick::Axis::R;
150 case HUG_RX:
151 return sf::Joystick::Axis::U;
152 case HUG_RY:
153 return sf::Joystick::Axis::V;
154 default:
155 return std::nullopt;
156 }
157}
158
159void hatValueToSfml(int value, sf::priv::JoystickState& state)
160{

Callers 2

getCapabilitiesMethod · 0.70
updateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected