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:
Frog
2025-11-19 03:27:28 -08:00
parent 21bcfae688
commit e6fa7b4a39
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -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;
+1 -3
View File
@@ -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,