Detection fix for issue #100
This commit is contained in:
Vendored
+1
@@ -188,3 +188,4 @@ _Pvt_Extensions/
|
|||||||
ModelManifest.xml
|
ModelManifest.xml
|
||||||
/.vs/slnx.sqlite
|
/.vs/slnx.sqlite
|
||||||
/.vs/VSWorkspaceState.json
|
/.vs/VSWorkspaceState.json
|
||||||
|
/.vs/Game Backup Monitor/v15/sqlite3/storage.ide
|
||||||
|
|||||||
@@ -167,8 +167,11 @@ Public Class mgrProcesses
|
|||||||
Dim sProcessCheck As String = String.Empty
|
Dim sProcessCheck As String = String.Empty
|
||||||
Dim sProcessList As String = String.Empty
|
Dim sProcessList As String = String.Empty
|
||||||
Dim bWineProcess As Boolean = False
|
Dim bWineProcess As Boolean = False
|
||||||
|
Dim bPass As Boolean
|
||||||
|
|
||||||
For Each prsCurrent As Process In prsList
|
For Each prsCurrent As Process In prsList
|
||||||
|
bPass = False
|
||||||
|
|
||||||
'This needs to be wrapped due to issues with Mono.
|
'This needs to be wrapped due to issues with Mono.
|
||||||
Try
|
Try
|
||||||
sProcessCheck = prsCurrent.ProcessName
|
sProcessCheck = prsCurrent.ProcessName
|
||||||
@@ -194,9 +197,11 @@ Public Class mgrProcesses
|
|||||||
'Do Nothing
|
'Do Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
'Detection Pass 1
|
||||||
If hshScanList.ContainsKey(sProcessCheck) Then
|
If hshScanList.ContainsKey(sProcessCheck) Then
|
||||||
prsFoundProcess = prsCurrent
|
prsFoundProcess = prsCurrent
|
||||||
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
|
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
|
||||||
|
bPass = True
|
||||||
|
|
||||||
If mgrCommon.IsUnix Then
|
If mgrCommon.IsUnix Then
|
||||||
GetUnixCommand(prsCurrent)
|
GetUnixCommand(prsCurrent)
|
||||||
@@ -214,10 +219,15 @@ Public Class mgrProcesses
|
|||||||
oDuplicateGames.Clear()
|
oDuplicateGames.Clear()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Duplicate And DuplicateList.Count = 0 Then Return False
|
If Duplicate And DuplicateList.Count = 0 Then bPass = False
|
||||||
|
|
||||||
If oGame.Parameter <> String.Empty And Not Duplicate And Not FullCommand.Contains(oGame.Parameter) Then Return False
|
If oGame.Parameter <> String.Empty And Not Duplicate And Not FullCommand.Contains(oGame.Parameter) Then bPass = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Detection Pass 2
|
||||||
|
If bPass Then
|
||||||
|
'Determine the process path if we need it
|
||||||
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
||||||
Try
|
Try
|
||||||
If Not bWineProcess Then
|
If Not bWineProcess Then
|
||||||
@@ -238,12 +248,12 @@ Public Class mgrProcesses
|
|||||||
Else
|
Else
|
||||||
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
|
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
|
||||||
'A different failure occured, drop out and continue to scan.
|
'A different failure occured, drop out and continue to scan.
|
||||||
Return False
|
bPass = False
|
||||||
End If
|
End If
|
||||||
Catch exAll As Exception
|
Catch exAll As Exception
|
||||||
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
|
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
|
||||||
'A different failure occured, drop out and continue to scan.
|
'A different failure occured, drop out and continue to scan.
|
||||||
Return False
|
bPass = False
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user