From 9f29bfbe59370dec368a9f9376652302f4d642db Mon Sep 17 00:00:00 2001 From: pointfeev Date: Tue, 30 Nov 2021 12:24:06 -0500 Subject: [PATCH] v2.0.4.0 --- CreamInstaller/Classes/ProgramSelection.cs | 8 ++++++-- CreamInstaller/CreamInstaller.csproj | 2 +- CreamInstaller/Forms/SelectForm.cs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CreamInstaller/Classes/ProgramSelection.cs b/CreamInstaller/Classes/ProgramSelection.cs index b0166fd..98b3ce6 100644 --- a/CreamInstaller/Classes/ProgramSelection.cs +++ b/CreamInstaller/Classes/ProgramSelection.cs @@ -34,7 +34,11 @@ namespace CreamInstaller } } - private void Toggle(KeyValuePair dlcApp, bool enabled) => SelectedSteamDlc[dlcApp.Key] = enabled ? dlcApp.Value : null; + private void Toggle(KeyValuePair dlcApp, bool enabled) + { + if (enabled) SelectedSteamDlc[dlcApp.Key] = dlcApp.Value; + else SelectedSteamDlc.Remove(dlcApp.Key); + } public void ToggleDlc(int dlcAppId, bool enabled) { @@ -66,7 +70,7 @@ namespace CreamInstaller public static ProgramSelection FromAppId(int appId) => AllSafe.Find(s => s.SteamAppId == appId); - public static KeyValuePair? GetAllSteamDlc(int appId) + public static KeyValuePair? GetDlcFromAppId(int appId) { foreach (ProgramSelection selection in AllSafe) foreach (KeyValuePair app in selection.AllSteamDlc) diff --git a/CreamInstaller/CreamInstaller.csproj b/CreamInstaller/CreamInstaller.csproj index f7eadbb..913cc90 100644 --- a/CreamInstaller/CreamInstaller.csproj +++ b/CreamInstaller/CreamInstaller.csproj @@ -5,7 +5,7 @@ true Resources\ini.ico true - 2.0.3.3 + 2.0.4.0 Resources\ini.ico Automatically generates and installs CreamAPI files for Steam games on the user's computer. It can also generate and install CreamAPI for the Paradox Launcher should the user select a Paradox Interactive game. diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index 699d5a8..4c5ad06 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -378,7 +378,7 @@ namespace CreamInstaller if (e.Button == MouseButtons.Right) { ProgramSelection selection = ProgramSelection.FromAppId(int.Parse(e.Node.Name)); - KeyValuePair? dlc = ProgramSelection.GetAllSteamDlc(int.Parse(e.Node.Name)); + KeyValuePair? dlc = ProgramSelection.GetDlcFromAppId(int.Parse(e.Node.Name)); int appId = selection?.SteamAppId ?? dlc?.Key ?? 0; if (appId > 0) Process.Start(new ProcessStartInfo {