Skip to content

Commit

Permalink
fix: 修正toolkit中adb config 错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Nov 30, 2023
1 parent 556acc7 commit 5fc0b80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions source/MaaToolKit/AdbDevice/DeviceMgrMacOS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ std::vector<Device> DeviceMgrMacOS::find_device_impl()
const auto& constant = kEmulators.at(e.name);
std::filesystem::path adb_path = get_adb_path(constant, e.process.pid);

auto serials = request_adb_serials(adb_path, json::value());
auto serials = request_adb_serials(adb_path, json::object());
serials.insert(serials.end(), constant.adb_common_serials.begin(), constant.adb_common_serials.end());
// Deduplication
auto set = std::set<std::string>(serials.begin(), serials.end());
serials.assign(set.begin(), set.end());
serials = check_available_adb_serials(adb_path, serials, json::value());
serials = check_available_adb_serials(adb_path, serials, json::object());

for (const std::string& ser : serials) {
Device device;
Expand All @@ -65,7 +65,7 @@ std::vector<Device> DeviceMgrMacOS::find_device_with_adb_impl(std::string_view a
{
std::vector<Device> result;

auto serials = request_adb_serials(path(adb_path), json::value());
auto serials = request_adb_serials(path(adb_path), json::object());

for (const std::string& ser : serials) {
Device device;
Expand Down
6 changes: 3 additions & 3 deletions source/MaaToolKit/AdbDevice/DeviceMgrWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ std::vector<Device> DeviceMgrWin32::find_device_impl()
const auto& constant = kEmulators.at(e.name);
std::filesystem::path adb_path = get_adb_path(constant, e.process.pid);

auto serials = request_adb_serials(adb_path, json::value());
auto serials = request_adb_serials(adb_path, json::object());
serials.insert(serials.end(), constant.adb_common_serials.begin(), constant.adb_common_serials.end());
// Deduplication
auto set = std::set<std::string>(serials.begin(), serials.end());
serials.assign(set.begin(), set.end());
serials = check_available_adb_serials(adb_path, serials, json::value());
serials = check_available_adb_serials(adb_path, serials, json::object());

for (const std::string& ser : serials) {
Device device;
Expand All @@ -94,7 +94,7 @@ std::vector<Device> DeviceMgrWin32::find_device_with_adb_impl(std::string_view a
{
std::vector<Device> result;

auto serials = request_adb_serials(path(adb_path), json::value());
auto serials = request_adb_serials(path(adb_path), json::object());

for (const std::string& ser : serials) {
Device device;
Expand Down

0 comments on commit 5fc0b80

Please sign in to comment.