Skip to content

Commit 9400409

Browse files
vbousquetJockeJarre
authored andcommitted
Fix B2S not detecting VPX window
see vpinball/vpinball#2529 B2S expects VPX window to be visible which is something that can not be guaranteed (it is hidden at some point, earlier in latest build, but it has laways been a race between VPX and B2S).
1 parent ad3650d commit 9400409

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

b2sbackglassserver/b2sbackglassserver/Classes/Processes.vb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Public Class Processes
115115
End Property
116116

117117
Private Function EnumWinProc(ByVal hwnd As IntPtr, ByVal lParam As Int32) As Boolean
118-
If IsWindowVisible(hwnd) AndAlso GetParent(hwnd) = IntPtr.Zero AndAlso GetWindowLong(hwnd, GWL_HWNDPARENT) = 0 Then
118+
If GetParent(hwnd) = IntPtr.Zero AndAlso GetWindowLong(hwnd, GWL_HWNDPARENT) = 0 Then
119119
Dim str As String = String.Empty.PadLeft(GetWindowTextLength(hwnd) + 1)
120120
GetWindowText(hwnd, str, str.Length)
121121
If Not String.IsNullOrEmpty(str.Substring(0, str.Length - 1)) Then windowlist.Add(New ProcInfo(str.Substring(0, str.Length - 1), hwnd))
@@ -128,3 +128,4 @@ Public Class Processes
128128
End Sub
129129

130130
End Class
131+

0 commit comments

Comments
 (0)