Update ProcessInterop.cs

This commit is contained in:
HolographicHat
2023-03-15 00:23:14 +08:00
committed by GitHub
parent cec4b2a23a
commit 770cabce81

View File

@@ -77,7 +77,7 @@ internal static class ProcessInterop
string pbasePath = Path.Combine(gameFolder, "mhypbase.dll");
SafeHandle handle = File.OpenHandle(pbasePath, share: FileShare.None);
while (true) {
if (game.Any(process => process.MainWindowHandle != nint.Zero)) {
if (game.MainWindowHandle != nint.Zero) {
handle.Close();
break;
}
@@ -88,4 +88,4 @@ internal static class ProcessInterop
return false;
}
}
}