diff --git a/source/cli/control.cpp b/source/cli/control.cpp index 2b0c8b8..b75e34b 100644 --- a/source/cli/control.cpp +++ b/source/cli/control.cpp @@ -28,5 +28,30 @@ bool select_server(int& server) return false; } + return true; +} + +bool app_package_and_activity(int server_type, std::string& package, std::string& activity) +{ + switch (server_type) { + case 1: + // "1. Official(CN)\n" + package = "com.miHoYo.enterprise.NGHSoD"; + activity = "com.miHoYo.enterprise.NGHSoD/com.miHoYo.overridenativeactivity.OverrideNativeActivity"; + break; + case 2: + // "2. Bilibili\n" + package = "com.miHoYo.bh3.bilibili"; + activity = "com.miHoYo.bh3.bilibili/com.miHoYo.overridenativeactivity.OverrideNativeActivity"; + break; + case 3: + // "2. Vivo\n" + package = "com.miHoYo.bh3.vivo"; + activity = "com.miHoYo.bh3.vivo/com.miHoYo.overridenativeactivity.OverrideNativeActivity"; + break; + default: + return false; + } + return true; } \ No newline at end of file diff --git a/source/cli/control.h b/source/cli/control.h index b54a69d..69d0dd0 100644 --- a/source/cli/control.h +++ b/source/cli/control.h @@ -4,4 +4,6 @@ bool default_control_init(ControlConfig& control); -bool select_server(int& server); \ No newline at end of file +bool select_server(int& server); + +bool app_package_and_activity(int client_type, std::string& package, std::string& activity); \ No newline at end of file diff --git a/source/cli/tasks.cpp b/source/cli/tasks.cpp index 110d01e..807ceb6 100644 --- a/source/cli/tasks.cpp +++ b/source/cli/tasks.cpp @@ -79,31 +79,6 @@ bool select_tasks(std::vector& tasklist) return true; } -bool app_package_and_activity(int client_type, std::string& package, std::string& activity) -{ - switch (client_type) { - case 1: - // "1. Official(CN)\n" - package = "com.miHoYo.enterprise.NGHSoD"; - activity = "com.miHoYo.enterprise.NGHSoD/com.miHoYo.overridenativeactivity.OverrideNativeActivity"; - break; - case 2: - // "2. Bilibili\n" - package = "com.miHoYo.bh3.bilibili"; - activity = "com.miHoYo.bh3.bilibili/com.miHoYo.overridenativeactivity.OverrideNativeActivity"; - break; - case 3: - // "2. Vivo\n" - package = "com.miHoYo.bh3.vivo"; - activity = "com.miHoYo.bh3.vivo/com.miHoYo.overridenativeactivity.OverrideNativeActivity"; - break; - default: - return false; - } - - return true; -} - json::value dorm_param() { json::value param; diff --git a/source/cli/tasks.h b/source/cli/tasks.h index 4732736..6e3eea0 100644 --- a/source/cli/tasks.h +++ b/source/cli/tasks.h @@ -15,6 +15,4 @@ json::value universal_mirage_param(); json::value close_game_param(); -bool app_package_and_activity(int client_type, std::string& package, std::string& activity); - std::string TaskStatus(MaaStatus status); \ No newline at end of file