From 7a6493f915687d31ff9b2e07aa5370d00fa30484 Mon Sep 17 00:00:00 2001 From: dongwlin Date: Thu, 23 Nov 2023 09:19:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=86=8D=E6=95=B4=E7=90=86=E4=B8=80?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/cli/control.cpp | 25 +++++++++++++++++++++++++ source/cli/control.h | 4 +++- source/cli/tasks.cpp | 25 ------------------------- source/cli/tasks.h | 2 -- 4 files changed, 28 insertions(+), 28 deletions(-) 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