mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-13 07:05:12 +01:00
Move network status updates to Network
This commit is contained in:
parent
b469064bc2
commit
3073af1d84
@ -492,14 +492,11 @@ void C64::network_vblank()
|
|||||||
} else if (this->network_connection_type == CONNECT) {
|
} else if (this->network_connection_type == CONNECT) {
|
||||||
network_connection_error_t err = this->peer->ConnectFSM();
|
network_connection_error_t err = this->peer->ConnectFSM();
|
||||||
|
|
||||||
TheDisplay->display_status_string("WAITING FOR CONNECTION...", 1);
|
|
||||||
|
|
||||||
if (err == OK) {
|
if (err == OK) {
|
||||||
if (this->peer->is_master)
|
if (this->peer->is_master)
|
||||||
this->network_connection_type = MASTER;
|
this->network_connection_type = MASTER;
|
||||||
else
|
else
|
||||||
this->network_connection_type = CLIENT;
|
this->network_connection_type = CLIENT;
|
||||||
TheDisplay->display_status_string("CONNECTED!", 1);
|
|
||||||
}
|
}
|
||||||
else if (err != AGAIN_ERROR)
|
else if (err != AGAIN_ERROR)
|
||||||
{
|
{
|
||||||
|
@ -1162,6 +1162,7 @@ network_connection_error_t Network::ConnectFSM()
|
|||||||
this->network_connection_state = CONN_WAIT_FOR_PEER_LIST;
|
this->network_connection_state = CONN_WAIT_FOR_PEER_LIST;
|
||||||
} break;
|
} break;
|
||||||
case CONN_WAIT_FOR_PEER_ADDRESS:
|
case CONN_WAIT_FOR_PEER_ADDRESS:
|
||||||
|
TheC64->TheDisplay->display_status_string((char*)"WAITING FOR CONNECTION...", 1);
|
||||||
err = this->WaitForPeerAddress();
|
err = this->WaitForPeerAddress();
|
||||||
if (err == OK)
|
if (err == OK)
|
||||||
this->network_connection_state = CONN_CONNECT_TO_PEER;
|
this->network_connection_state = CONN_CONNECT_TO_PEER;
|
||||||
@ -1192,6 +1193,7 @@ network_connection_error_t Network::ConnectFSM()
|
|||||||
case CONN_WAIT_FOR_PEER_REPLY:
|
case CONN_WAIT_FOR_PEER_REPLY:
|
||||||
/* Connect again in case the first sent was dropped on
|
/* Connect again in case the first sent was dropped on
|
||||||
* its way to the peer */
|
* its way to the peer */
|
||||||
|
TheC64->TheDisplay->display_status_string((char*)"CONNECTING TO PEER", 1);
|
||||||
if (this->ConnectToPeer() == false)
|
if (this->ConnectToPeer() == false)
|
||||||
return AGAIN_ERROR;
|
return AGAIN_ERROR;
|
||||||
if (this->WaitForPeerReply() == true)
|
if (this->WaitForPeerReply() == true)
|
||||||
@ -1200,6 +1202,7 @@ network_connection_error_t Network::ConnectFSM()
|
|||||||
return AGAIN_ERROR;
|
return AGAIN_ERROR;
|
||||||
break;
|
break;
|
||||||
case CONN_CONNECTED:
|
case CONN_CONNECTED:
|
||||||
|
TheC64->TheDisplay->display_status_string((char*)"CONNECTED!", 1);
|
||||||
/* The lowest number is the default master */
|
/* The lowest number is the default master */
|
||||||
default:
|
default:
|
||||||
return OK;
|
return OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user