diff --git a/server/wsproxy/app.cc b/server/wsproxy/app.cc index a2c2761..03e20bf 100644 --- a/server/wsproxy/app.cc +++ b/server/wsproxy/app.cc @@ -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 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;