mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
1 Commits
advanced-i
...
feat/spinw
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f29d260dd |
@@ -26,11 +26,16 @@ internal sealed class LaunchExecutionBetterGenshinImpactAutomationHandlder : ILa
|
||||
try
|
||||
{
|
||||
context.Logger.LogInformation("Waiting game window to be ready");
|
||||
context.Process.WaitForInputIdle();
|
||||
|
||||
SpinWait spinWait = default;
|
||||
while (context.Process.MainWindowHandle == IntPtr.Zero)
|
||||
{
|
||||
spinWait.SpinOnce();
|
||||
}
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
context.Logger.LogInformation("Failed to wait Input idle waiting");
|
||||
context.Logger.LogInformation("Failed to get game window handle");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user