DolphinWX: Delete traversal settings when pressing Reset

Deleting instead of overwriting makes the INI cleaner.
Also, in case we change defaults in the future, users will
get the new default when using a new version even if
they have pressed the Reset button in an older version.
This commit is contained in:
JosJuice 2016-10-02 17:04:03 +02:00
parent 337f573484
commit 6ff2bd3243

View File

@ -458,8 +458,8 @@ void NetPlaySetupFrame::OnResetTraversal(wxCommandEvent& event)
const std::string dolphin_ini = File::GetUserPath(F_DOLPHINCONFIG_IDX);
inifile.Load(dolphin_ini);
IniFile::Section& netplay_section = *inifile.GetOrCreateSection("NetPlay");
netplay_section.Set("TraversalServer", DEFAULT_TRAVERSAL_SERVER);
netplay_section.Set("TraversalPort", DEFAULT_TRAVERSAL_PORT);
netplay_section.Delete("TraversalServer");
netplay_section.Delete("TraversalPort");
inifile.Save(dolphin_ini);
m_traversal_lbl->SetLabelText(GetTraversalLabelText(netplay_section));