mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Apply suggestion
This commit is contained in:
@@ -27,11 +27,7 @@ internal sealed class LaunchExecutionBetterGenshinImpactAutomationHandlder : ILa
|
||||
{
|
||||
context.Logger.LogInformation("Waiting game window to be ready");
|
||||
|
||||
SpinWait spinWait = default;
|
||||
while (context.Process.MainWindowHandle == IntPtr.Zero)
|
||||
{
|
||||
spinWait.SpinOnce();
|
||||
}
|
||||
SpinWait.SpinUntil(() => context.Process.MainWindowHandle != IntPtr.Zero);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user