From 121236632cf4c62aced8e32667567de73ea23b4b Mon Sep 17 00:00:00 2001 From: Frog Date: Mon, 15 Jun 2026 02:07:46 -0700 Subject: [PATCH] Recall Games With Installed DLC Unlockers - Checks if CreamAPI/SmokeAPI/ScreamAPI are present in a game directory. If so, ensures it's stored in installed.json so we recall all games with DLC unlockers that have been detected, even if those DLC unlockers were not installed VIA CreamInstaller. --- CreamInstaller/Forms/SelectForm.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index fbf2bc7..c72b9d3 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -1397,6 +1397,30 @@ internal sealed partial class SelectForm : CustomForm selection.InstalledUnlocker = record.Unlocker; } + // Persist all selections with a detected DLC unlocker to installed.json, so they are tracked + // even when the unlocker was installed outside of CreamInstaller + foreach (Selection selection in Selection.All.Keys) + { + if (selection.InstalledUnlocker != InstalledUnlocker.None) + ProgramData.UpsertInstalledGame(new InstalledGameRecord + { + Platform = selection.Platform, + Id = selection.Id, + Name = selection.Name, + RootDirectory = selection.RootDirectory, + Unlocker = selection.InstalledUnlocker, + UseProxy = selection.UseProxy, + Proxy = selection.Proxy, + UseExtraProtection = selection.UseExtraProtection, + Dlc = selection.DLC.Select(dlc => new InstalledDlcRecord + { + DlcType = dlc.Type.ToString(), + Id = dlc.Id, + Name = dlc.Name + }).ToList() + }); + } + OnProxyChanged(); }