Xytrizareal authored and GitHub committed 2024-04-25 14:24:13 -07:00
1 parent bcd8d0053e
commit dfd98e303c
1 file changed
+3 -24
+3 -24
View File
@@ -42,7 +42,6 @@ namespace XPSLauncher
private static bool settingsOpen = false;
private static bool settingCloseOnLoad = false;
private static bool settingAllowMultipleInstances = false;
private static bool settingFix19GJP = false;
public Form1()
{
@@ -184,10 +183,10 @@ namespace XPSLauncher
if (File.Exists(path) && !downloadingVersions[version] && !errorVersions[version])
{
if ((settingAllowMultipleInstances && !IsProcessOpen(path)) || forceOpen)
if (settingAllowMultipleInstances || !IsProcessOpen(path) || forceOpen)
{
StartProcess(path);
if(version == "1.9" && settingFix19GJP) {
if(version == "1.9") {
StartProcess(Path.Combine(executionPath, "gdps", "1.9", "XPS-Proxy.exe"));
}
if (settingCloseOnLoad && !downloadingVersions["2.2"] && !downloadingVersions["2.1"] && !downloadingVersions["2.0"] && !downloadingVersions["1.9"])
@@ -692,8 +691,7 @@ namespace XPSLauncher
lastVersion = currentVersion,
closeOnLoad = false,
allowMultipleInstances = false,
theme = 0,
fix19GJP = false
theme = 0
};
string jsonText = Newtonsoft.Json.JsonConvert.SerializeObject(json, Newtonsoft.Json.Formatting.Indented);
File.WriteAllText(configPath, jsonText);
@@ -759,12 +757,6 @@ namespace XPSLauncher
config.closeOnLoad = config.closeOnExit ?? false;
}
if (config.lastVersion == "2.2.0")
{
WriteConfig("fix19GJP", false);
config.fix19GJP = false;
}
settingCloseOnLoad = config.closeOnLoad;
settingAllowMultipleInstances = config.allowMultipleInstances;
if (settingsOpen && settingCloseOnLoad)
@@ -861,19 +853,6 @@ namespace XPSLauncher
WriteConfig("allowMultipleInstances", settingAllowMultipleInstances);
}
private void Toggle19GJPFix(object sender = null, EventArgs e = null)
{
if (settingFix19GJP)
{
settingFix19GJP = false;
}
else
{
settingFix19GJP = true;
}
WriteConfig("fix19GJP", settingAllowMultipleInstances);
}
public List<int> GetPIDsByApplicationPath(string applicationPath)
{
var pids = new List<int>();