19gjpfix toggle option (not in ui, yet.) and tweaked sizes for render

This commit is contained in:
Xytrizareal committed 2024-04-19 23:51:48 -07:00
1 parent d2b651bcf9
commit bcd8d0053e
2 files changed
+30 -9

No files matched your search

+24 -3
View File
@@ -42,6 +42,7 @@ namespace XPSLauncher
private static bool settingsOpen = false;
private static bool settingCloseOnLoad = false;
private static bool settingAllowMultipleInstances = false;
private static bool settingFix19GJP = false;
public Form1()
{
@@ -183,10 +184,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") {
if(version == "1.9" && settingFix19GJP) {
StartProcess(Path.Combine(executionPath, "gdps", "1.9", "XPS-Proxy.exe"));
}
if (settingCloseOnLoad && !downloadingVersions["2.2"] && !downloadingVersions["2.1"] && !downloadingVersions["2.0"] && !downloadingVersions["1.9"])
@@ -691,7 +692,8 @@ namespace XPSLauncher
lastVersion = currentVersion,
closeOnLoad = false,
allowMultipleInstances = false,
theme = 0
theme = 0,
fix19GJP = false
};
string jsonText = Newtonsoft.Json.JsonConvert.SerializeObject(json, Newtonsoft.Json.Formatting.Indented);
File.WriteAllText(configPath, jsonText);
@@ -757,6 +759,12 @@ 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)
@@ -853,6 +861,19 @@ 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>();