| 143 | } |
| 144 | |
| 145 | MaaController* MaaDbgControllerCreate(const char* read_path) |
| 146 | { |
| 147 | LogFunc << VAR(read_path); |
| 148 | |
| 149 | if (!read_path) { |
| 150 | LogError << "read_path is null"; |
| 151 | return nullptr; |
| 152 | } |
| 153 | |
| 154 | auto control_unit = MAA_NS::DbgControlUnitLibraryHolder::create_control_unit(read_path); |
| 155 | |
| 156 | if (!control_unit) { |
| 157 | LogError << "Failed to create control unit"; |
| 158 | return nullptr; |
| 159 | } |
| 160 | |
| 161 | return new MAA_CTRL_NS::ControllerAgent(std::move(control_unit)); |
| 162 | } |
| 163 | |
| 164 | MaaController* MaaReplayControllerCreate(const char* recording_path) |
| 165 | { |
no test coverage detected