From d01067cd4f30752bf54ded0b65a437126eb3ff39 Mon Sep 17 00:00:00 2001 From: azw Date: Mon, 13 Nov 2023 03:54:03 +0000 Subject: [PATCH] 1 --- server/wsproxy/app.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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;