mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
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:
parent
337f573484
commit
6ff2bd3243
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user