Skip to content

Commit

Permalink
refactor: 重构启动和关闭森空岛
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Sep 16, 2023
1 parent c2fe4bb commit 97bb774
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions assets/resource/pipeline/skland.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions source/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<void*>(&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);
Expand Down

0 comments on commit 97bb774

Please sign in to comment.