mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-02-17 13:04:12 +01:00
Do check if GamePadUI window starts with SP
This commit is contained in:
parent
f1278dbb49
commit
b0277d3c0b
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue