From 668249b7e1a667dbfaa7daa46691e6a0a22b7776 Mon Sep 17 00:00:00 2001 From: Dongw Date: Thu, 19 Oct 2023 16:52:14 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=80=82=E9=85=8D=20MaaFramework=20v1?= =?UTF-8?q?.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/cli/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/cli/main.cpp b/source/cli/main.cpp index 9c0fb7c..a1002b2 100644 --- a/source/cli/main.cpp +++ b/source/cli/main.cpp @@ -56,13 +56,15 @@ int main(int argc, char** argv) std::string debug_dir = (cur_dir / "debug").string(); std::string resource_dir = (cur_dir / "resource").string(); std::string adb_config = MaaToolKitGetDeviceAdbConfig(kIndex); + std::string agent_dir = (cur_dir / "MaaAgentBinary").string(); MaaSetGlobalOption(MaaGlobalOption_Logging, (void*)debug_dir.c_str(), debug_dir.size()); MaaSetGlobalOption(MaaGlobalOption_DebugMode, (void*)&debug, sizeof(bool)); auto maa_handle = MaaCreate(nullptr, nullptr); auto resource_handle = MaaResourceCreate(nullptr, nullptr); - auto controller_handle = MaaAdbControllerCreate(adb.c_str(), adb_address.c_str(), control_type, adb_config.c_str(), nullptr, nullptr); + auto controller_handle = MaaAdbControllerCreateV2(adb.c_str(), adb_address.c_str(), control_type, + adb_config.c_str(), agent_dir.c_str(), nullptr, nullptr); MaaBindResource(maa_handle, resource_handle); MaaBindController(maa_handle, controller_handle);