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) { ...@@ -143,6 +143,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->ShowElement(mainGame->wSinglePlay); mainGame->ShowElement(mainGame->wSinglePlay);
else else
mainGame->ShowElement(mainGame->wLanWindow); mainGame->ShowElement(mainGame->wLanWindow);
if(exit_on_return)
mainGame->device->closeDevice();
} else { } else {
DuelClient::SendPacketToServer(CTOS_SURRENDER); DuelClient::SendPacketToServer(CTOS_SURRENDER);
} }
......
...@@ -134,7 +134,7 @@ int main(int argc, char* argv[]) { ...@@ -134,7 +134,7 @@ int main(int argc, char* argv[]) {
break; break;
} else if(!strcmp(argv[i], "-j")) { // Join host } else if(!strcmp(argv[i], "-j")) { // Join host
exit_on_return = !keep_on_return; exit_on_return = !keep_on_return;
ClickButton(ygo::mainGame->btnLanMode); ygo::mainGame->HideElement(ygo::mainGame->wMainMenu);
ClickButton(ygo::mainGame->btnJoinHost); ClickButton(ygo::mainGame->btnJoinHost);
break; break;
} else if(!strcmp(argv[i], "-r")) { // Replay } 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