Skip to content

Commit

Permalink
chore: 再整理一下
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Nov 23, 2023
1 parent 21badc3 commit 7a6493f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
25 changes: 25 additions & 0 deletions source/cli/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 3 additions & 1 deletion source/cli/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

bool default_control_init(ControlConfig& control);

bool select_server(int& server);
bool select_server(int& server);

bool app_package_and_activity(int client_type, std::string& package, std::string& activity);
25 changes: 0 additions & 25 deletions source/cli/tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,6 @@ bool select_tasks(std::vector<Task>& 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;
Expand Down
2 changes: 0 additions & 2 deletions source/cli/tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 7a6493f

Please sign in to comment.