0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 02:10:44 -05:00

Merge pull request 'update game check' (!33) from waffle.lord/Launcher:fix/game-check into master

Reviewed-on: SPT-AKI/Launcher#33
This commit is contained in:
chomp 2023-12-19 20:23:45 +00:00 committed by waffle.lord
commit 616393d985

View File

@ -12,24 +12,24 @@ namespace Aki.Launcher.Helpers
try try
{ {
var v1 = Registry.LocalMachine.OpenSubKey(c0, false).GetValue("UninstallString"); var v1 = Registry.LocalMachine.OpenSubKey(c0, false).GetValue("InstallLocation");
var v2 = (v1 != null) ? v1.ToString() : string.Empty; var v2 = (v1 != null) ? v1.ToString() : string.Empty;
var v3 = new FileInfo(v2); var v3 = new DirectoryInfo(v2);
var v4 = new FileInfo[] var v4 = new FileSystemInfo[]
{ {
v3, v3,
new FileInfo(v2.Replace(v3.Name, @"BattlEye\BEClient_x64.dll")), new FileInfo(Path.Join(v2, @"BattlEye\BEClient_x64.dll")),
new FileInfo(v2.Replace(v3.Name, @"BattlEye\BEService_x64.dll")), new FileInfo(Path.Join(v2, @"BattlEye\BEService_x64.dll")),
new FileInfo(v2.Replace(v3.Name, @"ConsistencyInfo")), new FileInfo(Path.Join(v2, "ConsistencyInfo")),
new FileInfo(v2.Replace(v3.Name, @"Uninstall.exe")), new FileInfo(Path.Join(v2, "Uninstall.exe")),
new FileInfo(v2.Replace(v3.Name, @"UnityCrashHandler64.exe")) new FileInfo(Path.Join(v2, "UnityCrashHandler64.exe"))
}; };
v0 = v4.Length - 1; v0 = v4.Length - 1;
foreach (var value in v4) foreach (var value in v4)
{ {
if (File.Exists(value.FullName)) if (value.Exists)
{ {
--v0; --v0;
} }