diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index 062d04a..fbf2bc7 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -192,10 +192,11 @@ internal sealed partial class SelectForm : CustomForm return; if (!uninstallAll) { - if (Program.IsGameBlocked(name, gameDirectory)) + string? blockReason = Program.GetGameBlockedReason(name, gameDirectory); + if (blockReason is not null) { steamBlocked++; - ProgramData.Log($"[Steam] Skipping blocked game: {name} ({appId})"); + ProgramData.Log($"[Steam] Skipping blocked game: {name} ({appId}) — {blockReason}"); _ = Interlocked.Decrement(ref steamGamesToCheck); continue; } @@ -218,6 +219,7 @@ internal sealed partial class SelectForm : CustomForm if (steamApiDllMissing) { dllDirectories = []; + ProgramData.Log($"[Steam] {name} ({appId}): no steam_api.dll or steam_api64.dll found — forced proxying will be used"); if (uninstallAll) { _ = Interlocked.Decrement(ref steamGamesToCheck); @@ -444,10 +446,11 @@ internal sealed partial class SelectForm : CustomForm return; if (!uninstallAll) { - if (Program.IsGameBlocked(name, directory)) + string? blockReason = Program.GetGameBlockedReason(name, directory); + if (blockReason is not null) { epicBlocked++; - ProgramData.Log($"[Epic] Skipping blocked game: {name} ({@namespace})"); + ProgramData.Log($"[Epic] Skipping blocked game: {name} ({@namespace}) — {blockReason}"); continue; } if (!programsToScan.Any(c => c.platform is Platform.Epic && c.id == @namespace)) @@ -465,7 +468,7 @@ internal sealed partial class SelectForm : CustomForm HashSet dllDirectories = await directory.GetDllDirectoriesFromGameDirectory(Platform.Epic); if (dllDirectories is null) { - ProgramData.Log($"[Epic] Skipping {name} ({@namespace}): no DLL directory found — game directory may be incomplete"); + ProgramData.Log($"[Epic] Skipping {name} ({@namespace}): no EOSSDK-Win32-Shipping.dll or EOSSDK-Win64-Shipping.dll found — game directory may be incomplete"); RemoveFromRemainingGames(name); return; } @@ -576,10 +579,11 @@ internal sealed partial class SelectForm : CustomForm return; if (!uninstallAll) { - if (Program.IsGameBlocked(name, gameDirectory)) + string? blockReason = Program.GetGameBlockedReason(name, gameDirectory); + if (blockReason is not null) { ubiBlocked++; - ProgramData.Log($"[Ubisoft] Skipping blocked game: {name} ({gameId})"); + ProgramData.Log($"[Ubisoft] Skipping blocked game: {name} ({gameId}) — {blockReason}"); continue; } if (!programsToScan.Any(c => c.platform is Platform.Ubisoft && c.id == gameId)) @@ -598,7 +602,7 @@ internal sealed partial class SelectForm : CustomForm await gameDirectory.GetDllDirectoriesFromGameDirectory(Platform.Ubisoft); if (dllDirectories is null) { - ProgramData.Log($"[Ubisoft] Skipping {name} ({gameId}): no DLL directory found"); + ProgramData.Log($"[Ubisoft] Skipping {name} ({gameId}): no uplay_r1_loader.dll or uplay_r1_loader64.dll found"); RemoveFromRemainingGames(name); return; } diff --git a/CreamInstaller/Program.cs b/CreamInstaller/Program.cs index 08370a7..41241ff 100644 --- a/CreamInstaller/Program.cs +++ b/CreamInstaller/Program.cs @@ -48,9 +48,19 @@ internal static class Program internal static bool DarkModeEnabled = true; internal static bool IsGameBlocked(string name, string directory = null) - => BlockProtectedGames && (ProtectedGames.Contains(name) || directory is not null && - !ProtectedGameDirectoryExceptions.Contains(name) - && ProtectedGameDirectories.Any(path => (directory + path).DirectoryExists())); + => GetGameBlockedReason(name, directory) is not null; + + internal static string? GetGameBlockedReason(string name, string directory = null) + { + if (!BlockProtectedGames) return null; + if (ProtectedGames.Contains(name)) return "on protected games list"; + if (directory is null) return null; + if (ProtectedGameDirectoryExceptions.Contains(name)) return null; + string? foundAntiCheat = ProtectedGameDirectories.FirstOrDefault(path => (directory + path).DirectoryExists()); + return foundAntiCheat is not null + ? $"{foundAntiCheat[1..]} directory found" + : null; + } [STAThread] private static void Main()