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

Method getDeviceIds

src/SFML/Window/Android/JniHelper.cpp:181–191  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

179
180////////////////////////////////////////////////////////////
181std::optional<JniArray<jint>> JniInputDeviceClass::getDeviceIds()
182{
183 auto* deviceIdsArray = static_cast<jintArray>(m_env.CallStaticObjectMethod(m_inputDeviceClass, m_getDeviceIdsMethod));
184 if (!deviceIdsArray)
185 {
186 err() << "No input devices found." << std::endl;
187 return std::nullopt;
188 }
189
190 return JniArray<jint>(m_env, deviceIdsArray);
191}
192
193
194////////////////////////////////////////////////////////////

Callers 1

openMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected