Commit e8443057 authored by zhykzhykzhyk's avatar zhykzhykzhyk Committed by mercury233

Do not display LAN window when invoke with join command line (#2120)

parent cef766ac
......@@ -143,6 +143,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->ShowElement(mainGame->wSinglePlay);
else
mainGame->ShowElement(mainGame->wLanWindow);
if(exit_on_return)
mainGame->device->closeDevice();
} else {
DuelClient::SendPacketToServer(CTOS_SURRENDER);
}
......
......@@ -134,7 +134,7 @@ int main(int argc, char* argv[]) {
break;
} else if(!strcmp(argv[i], "-j")) { // Join host
exit_on_return = !keep_on_return;
ClickButton(ygo::mainGame->btnLanMode);
ygo::mainGame->HideElement(ygo::mainGame->wMainMenu);
ClickButton(ygo::mainGame->btnJoinHost);
break;
} else if(!strcmp(argv[i], "-r")) { // Replay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment