mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
TraversalClient: Make data externally read-only members private
These are only ever queried for state, not written. Therefore, prevent writing to the members and make them private.
This commit is contained in:
@ -777,7 +777,7 @@ void NetPlayDialog::UpdateHostLabel()
|
||||
if (sel == 0)
|
||||
{
|
||||
// the traversal ID
|
||||
switch (g_TraversalClient->m_State)
|
||||
switch (g_TraversalClient->GetState())
|
||||
{
|
||||
case TraversalClient::Connecting:
|
||||
m_host_label->SetForegroundColour(*wxLIGHT_GREY);
|
||||
@ -786,13 +786,15 @@ void NetPlayDialog::UpdateHostLabel()
|
||||
m_host_copy_btn->Disable();
|
||||
break;
|
||||
case TraversalClient::Connected:
|
||||
{
|
||||
const auto host_id = g_TraversalClient->GetHostID();
|
||||
m_host_label->SetForegroundColour(*wxBLACK);
|
||||
m_host_label->SetLabel(
|
||||
wxString(g_TraversalClient->m_HostId.data(), g_TraversalClient->m_HostId.size()));
|
||||
m_host_label->SetLabel(wxString(host_id.data(), host_id.size()));
|
||||
m_host_copy_btn->SetLabel(_("Copy"));
|
||||
m_host_copy_btn->Enable();
|
||||
m_host_copy_btn_is_retry = false;
|
||||
break;
|
||||
}
|
||||
case TraversalClient::Failure:
|
||||
m_host_label->SetForegroundColour(*wxBLACK);
|
||||
m_host_label->SetLabel("...");
|
||||
|
Reference in New Issue
Block a user