mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
fix.修复adb连接重构后的一些问题
This commit is contained in:
@@ -629,13 +629,13 @@ bool asst::Controller::connect(const std::string & adb_path, const std::string &
|
||||
|
||||
auto cmd_replace = [&](const std::string& cfg_cmd) -> std::string {
|
||||
const std::unordered_map<std::string, std::string> replacements = {
|
||||
{"[Adb]", address},
|
||||
{"[Adb]", adb_path},
|
||||
{"[Address]", address},
|
||||
{"[DisplayId]", display_id}
|
||||
};
|
||||
std::string formatted = cfg_cmd;
|
||||
for (const auto& [key, value] : replacements) {
|
||||
utils::string_replace_all(formatted, key, value);
|
||||
formatted = utils::string_replace_all(formatted, key, value);
|
||||
}
|
||||
return formatted;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user