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

Method onAxisEvent

core/base/Controller-android.cpp:106–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105
106 static void onAxisEvent(std::string_view deviceName, int deviceId, int axisCode, float value, bool isAnalog)
107 {
108 auto iter = findController(deviceName, deviceId);
109 if (iter == Controller::s_allController.end())
110 {
111 AXLOGD("onAxisEvent:connect new controller.");
112 onConnected(deviceName, deviceId);
113 iter = findController(deviceName, deviceId);
114 }
115
116 (*iter)->onAxisEvent(axisCode, value, isAnalog);
117 }
118
119private:
120 Controller* _controller;

Callers

nothing calls this directly

Calls 4

findControllerFunction · 0.85
onConnectedFunction · 0.85
onAxisEventMethod · 0.65
endMethod · 0.45

Tested by

no test coverage detected