From 97bb7748f51deee22ba14862b76cf432a80a7c14 Mon Sep 17 00:00:00 2001 From: Dongw Date: Sat, 16 Sep 2023 15:18:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=92=8C=E5=85=B3=E9=97=AD=E6=A3=AE=E7=A9=BA=E5=B2=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resource/pipeline/skland.json | 6 ++---- source/cli/main.cpp | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/resource/pipeline/skland.json b/assets/resource/pipeline/skland.json index 5833805..80d5909 100644 --- a/assets/resource/pipeline/skland.json +++ b/assets/resource/pipeline/skland.json @@ -24,13 +24,11 @@ }, "Sub_StartSkland": { "is_sub": true, - "action": "StartApp", - "package": "com.hypergryph.skland/com.hypergryph.skland.SplashActivity" + "action": "StartApp" }, "CloseSkland": { "enabled": false, - "action": "StopApp", - "package": "com.hypergryph.skland" + "action": "StopApp" }, "IgnoreUpdates": { "recognition": "OCR", diff --git a/source/cli/main.cpp b/source/cli/main.cpp index 3b2ca84..11c1b7f 100644 --- a/source/cli/main.cpp +++ b/source/cli/main.cpp @@ -9,6 +9,8 @@ int main(int argc, char** argv) bool debug = false; std::string adb; std::string adb_address; + std::string package = "com.hypergryph.skland"; + std::string activity = "com.hypergryph.skland/com.hypergryph.skland.SplashActivity"; TaskList tasks; MaaAdbControllerType control_type = 0; @@ -57,6 +59,8 @@ int main(int argc, char** argv) MaaBindController(maa_handle, controller_handle); int height = 720; MaaControllerSetOption(controller_handle, MaaCtrlOption_ScreenshotTargetShortSide, reinterpret_cast(&height), sizeof(int)); + MaaControllerSetOption(controller_handle, MaaCtrlOption_DefaultAppPackageEntry, (void*)activity.c_str(), activity.size()); + MaaControllerSetOption(controller_handle, MaaCtrlOption_DefaultAppPackage, (void*)package.c_str(), package.size()); auto resource_id = MaaResourcePostPath(resource_handle, resource_dir.c_str()); auto connection_id = MaaControllerPostConnection(controller_handle);