MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / init

Method init

source/MaaAdbControlUnit/Manager/InputAgent.cpp:103–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103bool InputAgent::init()
104{
105 LogFunc;
106
107 if (active_unit_) {
108 LogError << "already initialized" << VAR(active_unit_);
109 return false;
110 }
111
112 for (auto& unit : units_ | std::views::values) {
113 if (!unit->init()) {
114 continue;
115 }
116 active_unit_ = std::move(unit);
117 break;
118 }
119
120 if (!active_unit_) {
121 LogError << "No available input method";
122 return false;
123 }
124
125 units_.clear();
126 return true;
127}
128
129MaaControllerFeature InputAgent::get_features() const
130{

Callers 1

connectMethod · 0.45

Calls 2

moveFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected