- Fixed blocked games being displayed in the pre-scan selection tree
This commit is contained in:
pointfeev 2022-03-25 14:38:37 -04:00
parent 79e7bc73ed
commit 659f99e491
3 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@
<UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Version>3.4.1.0</Version>
<Version>3.4.1.1</Version>
<PackageIcon>Resources\ini.ico</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>

View file

@ -415,7 +415,7 @@ internal partial class SelectForm : CustomForm
gameChoices.Add(("Paradox", "ParadoxLauncher", "Paradox Launcher", ProgramsToScan is not null && ProgramsToScan.Any(p => p.id == "ParadoxLauncher")));
if (Directory.Exists(SteamLibrary.InstallPath))
foreach (Tuple<string, string, string, int, string> program in await SteamLibrary.GetGames())
if (!Program.IsGameBlocked(program.Item1, program.Item5))
if (!Program.IsGameBlocked(program.Item2, program.Item5))
gameChoices.Add(("Steam", program.Item1, program.Item2, ProgramsToScan is not null && ProgramsToScan.Any(p => p.id == program.Item1)));
if (Directory.Exists(EpicLibrary.EpicManifestsPath))
foreach (Manifest manifest in await EpicLibrary.GetGames())
@ -771,7 +771,7 @@ internal partial class SelectForm : CustomForm
private void OnBlockProtectedGamesHelpButtonClicked(object sender, EventArgs e)
{
string blockedGames = "";
foreach (string name in Program.ProtectedGameNames)
foreach (string name in Program.ProtectedGames)
blockedGames += helpButtonListPrefix + name;
string blockedDirectories = "";
foreach (string path in Program.ProtectedGameDirectories)
@ -783,7 +783,7 @@ internal partial class SelectForm : CustomForm
form.Show(SystemIcons.Information,
"Blocks the program from caching and displaying games protected by DLL checks," +
"\nanti-cheats, or that are confirmed not to be working with CreamAPI or ScreamAPI." +
"\n\nBlocked game names:" + blockedGames +
"\n\nBlocked games:" + blockedGames +
"\n\nBlocked game sub-directories:" + blockedDirectories +
"\n\nBlocked game sub-directory exceptions (not blocked):" + blockedDirectoryExceptions,
"OK", customFormText: "Block Protected Games");

View file

@ -22,14 +22,14 @@ internal static class Program
internal static readonly string CurrentProcessFilePath = CurrentProcess.MainModule.FileName;
internal static bool BlockProtectedGames = true;
internal static readonly string[] ProtectedGameNames = { "PAYDAY 2", "Call to Arms" }; // non-functioning CreamAPI/ScreamAPI or DLL detections
internal static readonly string[] ProtectedGames = { "PAYDAY 2", "Call to Arms" }; // non-functioning CreamAPI/ScreamAPI or DLL detections
internal static readonly string[] ProtectedGameDirectories = { @"\EasyAntiCheat", @"\BattlEye" }; // DLL detections
internal static readonly string[] ProtectedGameDirectoryExceptions = { "Arma 3" }; // Arma 3's BattlEye doesn't detect DLL changes?
internal static bool IsGameBlocked(string name, string directory = null)
{
if (!BlockProtectedGames) return false;
if (ProtectedGameNames.Contains(name)) return true;
if (ProtectedGames.Contains(name)) return true;
if (directory is not null && !ProtectedGameDirectoryExceptions.Contains(name))
foreach (string path in ProtectedGameDirectories)
if (Directory.Exists(directory + path)) return true;