From 0d6348e253bbcca3dbd0cd71dd34fec516236f58 Mon Sep 17 00:00:00 2001 From: sabihoshi Date: Mon, 5 Apr 2021 03:20:01 +0800 Subject: [PATCH] Remove unnecessary IntPtr.Zero check --- GenshinLyreMidiPlayer/Core/WindowHelper.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/GenshinLyreMidiPlayer/Core/WindowHelper.cs b/GenshinLyreMidiPlayer/Core/WindowHelper.cs index 02b538c..3e81a1b 100644 --- a/GenshinLyreMidiPlayer/Core/WindowHelper.cs +++ b/GenshinLyreMidiPlayer/Core/WindowHelper.cs @@ -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)