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

Method updateButtons

examples/joystick/Joystick.cpp:117–128  ·  view source on GitHub ↗

Update joystick buttons

Source from the content-addressed store, hash-verified

115
116 // Update joystick buttons
117 void updateButtons()
118 {
119 auto sstr = getStream();
120 for (unsigned int j = 0; j < sf::Joystick::getButtonCount(m_index); ++j)
121 {
122 sstr.str("");
123 sstr << "Button " << j;
124
125 auto buttonName = sstr.str();
126 set(buttonName, sf::Joystick::isButtonPressed(m_index, j), sstr);
127 }
128 }
129
130 void updateValues()
131 {

Callers

nothing calls this directly

Calls 3

getStreamFunction · 0.85
getButtonCountFunction · 0.85
isButtonPressedFunction · 0.50

Tested by

no test coverage detected