From 3e141cebb5eb3aa7b98e07e711f6a94f3b111430 Mon Sep 17 00:00:00 2001 From: MikeMaximus Date: Sat, 1 Sep 2018 14:40:05 -0600 Subject: [PATCH] Changes for issue #153 --- GBM/Managers/mgrMonitorList.vb | 2 +- GBM/Managers/mgrProcessDetection.vb | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/GBM/Managers/mgrMonitorList.vb b/GBM/Managers/mgrMonitorList.vb index 8141ab9..0544a00 100644 --- a/GBM/Managers/mgrMonitorList.vb +++ b/GBM/Managers/mgrMonitorList.vb @@ -78,7 +78,7 @@ Public Class mgrMonitorList Dim oCompareGame As clsGame Dim bIsDupe As Boolean - sSQL = "Select * FROM monitorlist ORDER BY Name Asc" + sSQL = "SELECT * FROM monitorlist ORDER BY IsRegEx DESC" oData = oDatabase.ReadParamData(sSQL, New Hashtable) For Each dr As DataRow In oData.Tables(0).Rows diff --git a/GBM/Managers/mgrProcessDetection.vb b/GBM/Managers/mgrProcessDetection.vb index 3a11d11..35c6116 100644 --- a/GBM/Managers/mgrProcessDetection.vb +++ b/GBM/Managers/mgrProcessDetection.vb @@ -94,8 +94,14 @@ Public Class mgrProcessDetection For Each o As clsGame In hshScanList.Values sProcess = o.ProcessName.Split(":")(0) - If o.Duplicate = True And (sProcess = oGame.TrueProcess Or Regex.IsMatch(sProcess, oGame.TrueProcess)) Then - oInitialDupes.Add(o.ShallowCopy) + If o.Duplicate And o.IsRegEx Then + If Regex.IsMatch(prsFoundProcess.ProcessName, sProcess) Then + oInitialDupes.Add(o.ShallowCopy) + End If + ElseIf o.Duplicate And Not o.IsRegEx Then + If sProcess = prsFoundProcess.ProcessName Then + oInitialDupes.Add(o.ShallowCopy) + End If End If Next