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

Method onDisconnected

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

Source from the content-addressed store, hash-verified

71 }
72
73 static void onDisconnected(std::string_view deviceName, int deviceId)
74 {
75 AXLOGD("onDisconnected {},{}", deviceName, deviceId);
76
77 auto iter = findController(deviceName, deviceId);
78 if (iter == Controller::s_allController.end())
79 {
80 AXLOGE("Could not find the controller!");
81 return;
82 }
83
84 (*iter)->onDisconnected();
85 Controller::s_allController.erase(iter);
86 }
87
88 static void onButtonEvent(std::string_view deviceName,
89 int deviceId,

Callers

nothing calls this directly

Calls 4

findControllerFunction · 0.85
onDisconnectedMethod · 0.65
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected