From b0277d3c0b5f6961663023048d310dc02a8ac27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Fri, 16 Dec 2022 14:16:31 +0100 Subject: [PATCH] Do check if `GamePadUI` window starts with `SP` --- SteamController/Helpers/SteamConfiguration.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SteamController/Helpers/SteamConfiguration.cs b/SteamController/Helpers/SteamConfiguration.cs index c184ee0..a4f3911 100644 --- a/SteamController/Helpers/SteamConfiguration.cs +++ b/SteamController/Helpers/SteamConfiguration.cs @@ -74,10 +74,15 @@ namespace SteamController.Helpers StringBuilder className = new StringBuilder(256); if (GetClassName(hWnd, className, className.Capacity) == 0) return false; - if (className.ToString() != "SDL_app") return false; + StringBuilder windowText = new StringBuilder(256); + if (GetWindowText(hWnd, windowText, windowText.Capacity) == 0) + return false; + if (!windowText.ToString().StartsWith("SP")) + return false; + return ForegroundProcess.Find(hWnd)?.ProcessName == "steamwebhelper"; } }