Only try and make a connection if we have enabled EmulateNet

This commit is contained in:
Ian Curtis 2020-06-17 15:11:58 +00:00
parent 1a3407bec8
commit 9a651bdb61

View file

@ -1246,12 +1246,13 @@ bool CNetBoard::Init(UINT8 * netRAMPtr, UINT8 *netBufferPtr)
nets = std::make_unique<TCPSend>(addr_out, port_out);
netr = std::make_unique<TCPReceive>(port_in);
while (!nets->Connect()) {
printf("Connecting to %s:%i ..\n", addr_out.c_str(), port_out);
if (m_config["EmulateNet"].ValueAs<bool>()) {
while (!nets->Connect()) {
printf("Connecting to %s:%i ..\n", addr_out.c_str(), port_out);
}
printf("Successfully connected.\n");
}
printf("Successfully connected.\n");
return OKAY;
}