Skip to content

Commit

Permalink
Remove unnecessary IntPtr.Zero check
Browse files Browse the repository at this point in the history
  • Loading branch information
sabihoshi committed Apr 4, 2021
1 parent 84ede76 commit 0d6348e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions GenshinLyreMidiPlayer/Core/WindowHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public static bool EnsureGameOnTop()

SwitchToThisWindow((IntPtr) genshinWindow, true);

return !genshinWindow.Equals(IntPtr.Zero) &&
GetForegroundWindow().Equals(genshinWindow);
return GetForegroundWindow().Equals(genshinWindow);
}

private static bool IsWindowFocused(IntPtr windowPtr)
Expand Down

0 comments on commit 0d6348e

Please sign in to comment.