mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 11:29:24 +01:00
Connect/disconnect from the menu
This commit is contained in:
parent
b5392e248b
commit
6fdceb0a26
@ -1241,7 +1241,7 @@ bool Network::ConnectToPeer()
|
|||||||
|
|
||||||
void Network::Disconnect()
|
void Network::Disconnect()
|
||||||
{
|
{
|
||||||
printf("Disconnecting\n");
|
Gui::gui->status_bar->queueMessage("Disconnecting");
|
||||||
|
|
||||||
this->ResetNetworkUpdate();
|
this->ResetNetworkUpdate();
|
||||||
NetworkUpdate *disconnect = InitNetworkUpdate(this->cur_ud, DISCONNECT,
|
NetworkUpdate *disconnect = InitNetworkUpdate(this->cur_ud, DISCONNECT,
|
||||||
|
@ -69,7 +69,9 @@ public:
|
|||||||
Gui::gui->pushView(Gui::gui->nrv);
|
Gui::gui->pushView(Gui::gui->nrv);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if ( strncmp(Gui::gui->np->NetworkName, "Unset", strlen("Unset")) == 0)
|
if (TheC64->network)
|
||||||
|
TheC64->network->Disconnect();
|
||||||
|
else if ( strncmp(Gui::gui->np->NetworkName, "Unset", strlen("Unset")) == 0)
|
||||||
Gui::gui->pushDialogueBox(new DialogueBox(network_unset_name_dlg));
|
Gui::gui->pushDialogueBox(new DialogueBox(network_unset_name_dlg));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -130,7 +132,7 @@ private:
|
|||||||
this->messages[2] = this->strs[2];
|
this->messages[2] = this->strs[2];
|
||||||
|
|
||||||
this->messages[3] = " ";
|
this->messages[3] = " ";
|
||||||
this->messages[4] = "Connect to the network!";
|
this->messages[4] = TheC64->network ? "Disconnect" : "Connect to the network!";
|
||||||
this->messages[5] = " ";
|
this->messages[5] = " ";
|
||||||
this->messages[6] = "Post network message";
|
this->messages[6] = "Post network message";
|
||||||
this->messages[7] = "Post peer message";
|
this->messages[7] = "Post peer message";
|
||||||
|
Loading…
Reference in New Issue
Block a user