MCPcopy Create free account
hub / github.com/axmolengine/axmol / onButtonEvent

Function onButtonEvent

core/base/Controller-linux-win32.cpp:4299–4310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4297 }
4298
4299 static void onButtonEvent(int deviceId, int keyCode, bool isPressed, float value, bool isAnalog)
4300 {
4301 auto iter = findController(deviceId);
4302 if (iter == Controller::s_allController.end())
4303 {
4304 AXLOGD("ControllerImpl::onButtonEvent: new controller detected. Registering...");
4305 onConnected(glfwGetJoystickName(deviceId), deviceId);
4306 iter = findController(deviceId);
4307 }
4308
4309 (*iter)->onButtonEvent(keyCode, isPressed, value, isAnalog);
4310 }
4311
4312 static void onAxisEvent(int deviceId, int axisCode, float value, bool isAnalog)
4313 {

Calls 5

findControllerFunction · 0.85
onConnectedFunction · 0.85
glfwGetJoystickNameFunction · 0.85
onButtonEventMethod · 0.65
endMethod · 0.45

Tested by

no test coverage detected