From c0e8a025e320ee323d9a6d61b91db2cb4c2df6d4 Mon Sep 17 00:00:00 2001 From: MistEO Date: Tue, 28 Nov 2023 23:30:25 +0800 Subject: [PATCH] fix: adb config error of toolkit --- source/MaaToolKit/AdbDevice/DeviceMgrMacOS.cpp | 4 ++-- source/MaaToolKit/AdbDevice/DeviceMgrWin32.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/MaaToolKit/AdbDevice/DeviceMgrMacOS.cpp b/source/MaaToolKit/AdbDevice/DeviceMgrMacOS.cpp index 009f00c93..6cd3d7e86 100644 --- a/source/MaaToolKit/AdbDevice/DeviceMgrMacOS.cpp +++ b/source/MaaToolKit/AdbDevice/DeviceMgrMacOS.cpp @@ -51,7 +51,7 @@ std::vector DeviceMgrMacOS::find_device_impl() device.adb_path = path_to_utf8_string(adb_path); device.adb_serial = ser; // TODO: 根据设备情况使用不同的配置 - device.adb_config = json::value().to_string(); + device.adb_config = json::object().to_string(); device.adb_controller_type = check_adb_controller_type(device.adb_path, device.adb_serial, device.adb_config); result.emplace_back(std::move(device)); @@ -72,7 +72,7 @@ std::vector DeviceMgrMacOS::find_device_with_adb_impl(std::string_view a device.name = adb_path; device.adb_path = adb_path; device.adb_serial = ser; - device.adb_config = json::value().to_string(); + device.adb_config = json::object().to_string(); device.adb_controller_type = check_adb_controller_type(device.adb_path, device.adb_serial, device.adb_config); result.emplace_back(std::move(device)); } diff --git a/source/MaaToolKit/AdbDevice/DeviceMgrWin32.cpp b/source/MaaToolKit/AdbDevice/DeviceMgrWin32.cpp index 94b207061..2fb0a6091 100644 --- a/source/MaaToolKit/AdbDevice/DeviceMgrWin32.cpp +++ b/source/MaaToolKit/AdbDevice/DeviceMgrWin32.cpp @@ -80,7 +80,7 @@ std::vector DeviceMgrWin32::find_device_impl() device.adb_path = path_to_utf8_string(adb_path); device.adb_serial = ser; // TODO: 根据设备情况使用不同的配置 - device.adb_config = json::value().to_string(); + device.adb_config = json::object().to_string(); device.adb_controller_type = check_adb_controller_type(device.adb_path, device.adb_serial, device.adb_config); result.emplace_back(std::move(device)); @@ -101,7 +101,7 @@ std::vector DeviceMgrWin32::find_device_with_adb_impl(std::string_view a device.name = adb_path; device.adb_path = adb_path; device.adb_serial = ser; - device.adb_config = json::value().to_string(); + device.adb_config = json::object().to_string(); device.adb_controller_type = check_adb_controller_type(device.adb_path, device.adb_serial, device.adb_config); result.emplace_back(std::move(device)); }