only write profileIndex on launcher close

pull/32/head
Miepee 4 years ago
parent 611614e694
commit 12d6b5f202

@ -739,8 +739,6 @@ namespace AM2RLauncher
profileAuthorLabel.Text = Language.Text.Author + " " + profileList[profileDropDown.SelectedIndex].Author; profileAuthorLabel.Text = Language.Text.Author + " " + profileList[profileDropDown.SelectedIndex].Author;
profileVersionLabel.Text = Language.Text.VersionLabel + " " + profileList[profileDropDown.SelectedIndex].Version; profileVersionLabel.Text = Language.Text.VersionLabel + " " + profileList[profileDropDown.SelectedIndex].Version;
// TODO: only write this on application quit
CrossPlatformOperations.WriteToConfig("ProfileIndex", profileIndex.ToString());
if (profileDropDown.SelectedIndex != 0 && (profileList[profileDropDown.SelectedIndex].SaveLocation == "%localappdata%/AM2R" || if (profileDropDown.SelectedIndex != 0 && (profileList[profileDropDown.SelectedIndex].SaveLocation == "%localappdata%/AM2R" ||
profileList[profileDropDown.SelectedIndex].SaveLocation == "default")) profileList[profileDropDown.SelectedIndex].SaveLocation == "default"))
@ -1054,6 +1052,7 @@ namespace AM2RLauncher
CrossPlatformOperations.WriteToConfig("Width", ClientSize.Width); CrossPlatformOperations.WriteToConfig("Width", ClientSize.Width);
CrossPlatformOperations.WriteToConfig("Height", ClientSize.Height); CrossPlatformOperations.WriteToConfig("Height", ClientSize.Height);
CrossPlatformOperations.WriteToConfig("IsMaximized", this.WindowState == WindowState.Maximized); CrossPlatformOperations.WriteToConfig("IsMaximized", this.WindowState == WindowState.Maximized);
CrossPlatformOperations.WriteToConfig("ProfileIndex", profileIndex.ToString());
switch (updateState) switch (updateState)
{ {

Loading…
Cancel
Save