Skip to content

Commit

Permalink
up 忽略一些报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Feb 3, 2024
1 parent 081130d commit 0ff394c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UIBinding/BaseBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ await Launch(obj, (a) =>
}
catch (Exception e)

Check warning on line 592 in src/ColorMC.Gui/UIBinding/BaseBinding.cs

View workflow job for this annotation

GitHub Actions / build-macos

The variable 'e' is declared but never used

Check warning on line 592 in src/ColorMC.Gui/UIBinding/BaseBinding.cs

View workflow job for this annotation

GitHub Actions / build-windows

The variable 'e' is declared but never used

Check warning on line 592 in src/ColorMC.Gui/UIBinding/BaseBinding.cs

View workflow job for this annotation

GitHub Actions / build-linux

The variable 'e' is declared but never used
{
Logs.Crash("game", e);

}
});
}
Expand Down
17 changes: 12 additions & 5 deletions src/ColorMC.Gui/Utils/Hook/Win32Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,22 @@ public struct CWPSTRUCT

internal static void WaitWindowDisplay(Process process)
{
while (!process.HasExited)
try
{
process.WaitForInputIdle();
Thread.Sleep(500);
if (process.MainWindowHandle != IntPtr.Zero)
while (!process.HasExited)
{
break;
process.WaitForInputIdle();
Thread.Sleep(500);
if (process.MainWindowHandle != IntPtr.Zero)
{
break;
}
}
}
catch
{

}
}

internal static void SetTitle(Process process, string title)
Expand Down

0 comments on commit 0ff394c

Please sign in to comment.