This commit is contained in:
azw 2023-11-13 03:54:03 +00:00
parent fedc0c25a1
commit d01067cd4f

View File

@ -500,8 +500,12 @@ void App::DispatchUdpMsg()
int App::GetGameId() const
{
#ifdef DEBUG
std::string game_id = a8::XValue(getenv("_")).GetString();
a8::ReplaceString(game_id, "./wsproxy", "");
std::string game_id = a8::XValue((f8::App::Instance()->GetArgv())[0]).GetString();
std::vector<std::string> strings;
a8::Split(game_id, strings, '/');
game_id = strings.at(strings.size() - 1);
//a8::XPrintf("exe:%s\n", {game_id});
a8::ReplaceString(game_id, "wsproxy", "");
return a8::XValue(game_id);
#else
return GAME_ID;