mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-06-12 11:01:23 -07:00
Fixed unreachable logging segment for CreamAPI
- Fixed unreachable code that provides information about deleted config file - Adjusted old comment from pointfeev that indiciated SmokeAPI might always be false (it's now toggleable)
This commit is contained in:
@@ -35,7 +35,7 @@ internal static class Program
|
||||
internal static readonly string CurrentProcessFilePath = CurrentProcess.MainModule?.FileName;
|
||||
internal static readonly int CurrentProcessId = CurrentProcess.Id;
|
||||
|
||||
// this may forever be false, but who knows, maybe acidicoala makes it once again better than CreamAPI some day
|
||||
// Setting is now toggleable. Huzzah!
|
||||
internal static bool UseSmokeAPI = true;
|
||||
|
||||
internal static bool BlockProtectedGames = true;
|
||||
|
||||
@@ -37,6 +37,7 @@ internal static class CreamAPI
|
||||
_ = dlc.Add(extraDlc);
|
||||
|
||||
config.DeleteFile();
|
||||
installForm?.UpdateUser($"Deleted unnecessary configuration: {Path.GetFileName(config)}", LogTextBox.Action, false);
|
||||
config.CreateFile(true, installForm)?.Close();
|
||||
StreamWriter writer = new(config, true, Encoding.Default);
|
||||
WriteConfig(writer, selection.Name, !int.TryParse(selection.Id, out _) ? "0" : selection.Id,
|
||||
@@ -44,9 +45,6 @@ internal static class CreamAPI
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
return;
|
||||
|
||||
installForm?.UpdateUser($"Deleted unnecessary configuration: {Path.GetFileName(config)}", LogTextBox.Action,
|
||||
false);
|
||||
}
|
||||
|
||||
private static void WriteConfig(StreamWriter writer, string name, string appId,
|
||||
|
||||
Reference in New Issue
Block a user