Store profileDebugLog as a boolean to fix crashing when its toggled

pull/30/head
Miepee 5 years ago
parent 8b3623ae07
commit bf79ec01ba

@ -49,7 +49,7 @@ namespace AM2RLauncher.XML
{ get; set; }
/// <summary>Indicates whether or not to create debug logs of profile. Used for <see cref="MainForm.profileDebugLogCheck"/></summary>
[XmlAttribute("ProfileDebugLog")]
public string ProfileDebugLog
public bool ProfileDebugLog
{ get; set; }
/// <summary>Indicates the custom environment variable(s) as text. Used for <see cref="MainForm.customEnvVarTextBox"/></summary>
[XmlAttribute("CustomEnvVar")]
@ -107,7 +107,7 @@ namespace AM2RLauncher.XML
MirrorIndex = 0;
CustomMirrorEnabled = false;
CustomMirrorText = "";
ProfileDebugLog = "true";
ProfileDebugLog = true;
CustomEnvVar = "";
Width = 600;
Height = 600;
@ -126,12 +126,13 @@ namespace AM2RLauncher.XML
/// <param name="mirrorIndex">Parameter that saves the index of the selected mirror in <see cref="MainForm.mirrorDropDown"/>.</param>
/// <param name="customEnvVar">Parameter that saves custom Environment variables that will be used on Linux for launching a game.</param>
/// <param name="customMirrorEnabled">Parameter that indicates if <see cref="MainForm.customMirrorCheck"/> is enabled or not.</param>
/// <param name="profileDebugLog">Parameter that indicates if <see cref="Mainform.profileDebugLog"/> is enabled or not.</param>
/// <param name="customMirrorText">Parameter that's used for <see cref="MainForm.customMirrorTextBox"/>.</param>
/// <param name="width">Parameter that indicates the width of <see cref="MainForm"/>.</param>
/// <param name="height">Parameter that indicates the height of <see cref="MainForm"/>.</param>
/// <param name="isMaximized">Parameter that indicates if <see cref="MainForm"/> has been set to fullscreen or not.</param>
public LauncherConfigXML(bool autoUpdateAM2R, bool autoUpdateLauncher, string language, bool musicHQPC, bool musicHQAndroid,
string profileIndex, int mirrorIndex, string customEnvVar, bool customMirrorEnabled,
string profileIndex, int mirrorIndex, bool profileDebugLog, string customEnvVar, bool customMirrorEnabled,
string customMirrorText, int width, int height, bool isMaximized)
{
AutoUpdateAM2R = autoUpdateAM2R;
@ -143,6 +144,7 @@ namespace AM2RLauncher.XML
MirrorIndex = mirrorIndex;
CustomMirrorEnabled = customMirrorEnabled;
CustomMirrorText = customMirrorText;
ProfileDebugLog = profileDebugLog;
CustomEnvVar = customEnvVar;
Width = width;
Height = height;

Loading…
Cancel
Save