diff --git a/GBM/Forms/frmMain.vb b/GBM/Forms/frmMain.vb index ca0be18..dbe4013 100644 --- a/GBM/Forms/frmMain.vb +++ b/GBM/Forms/frmMain.vb @@ -1941,6 +1941,8 @@ Public Class frmMain End If End If End If + 'This does required mods to include/exclude data and relative paths (if required) + mgrPath.ModWinePathData(oProcess.GameInfo) End If If bContinue = True Then diff --git a/GBM/Managers/mgrPath.vb b/GBM/Managers/mgrPath.vb index cb3af9c..1b549e8 100644 --- a/GBM/Managers/mgrPath.vb +++ b/GBM/Managers/mgrPath.vb @@ -203,6 +203,12 @@ Public Class mgrPath Return sResult End Function + Public Shared Sub ModWinePathData(ByRef oGame As clsGame) + If Not oGame.AbsolutePath Then oGame.Path = oGame.Path.Replace("\", Path.DirectorySeparatorChar) + oGame.FileType = oGame.FileType.Replace("\", Path.DirectorySeparatorChar) + oGame.ExcludeList = oGame.ExcludeList.Replace("\", Path.DirectorySeparatorChar) + End Sub + Private Shared Function BuildWinePath(ByVal sPath As String, ByVal sWinePrefix As String) As String Dim sRealPath As String Dim cDriveLetter As Char @@ -217,7 +223,7 @@ Public Class mgrPath sRealPath = sRealPath.TrimEnd("""") 'Flip Seperators - sRealPath = sRealPath.Replace("\\", "/") + sRealPath = sRealPath.Replace("\\", Path.DirectorySeparatorChar) 'Change Wine Drive cDriveLetter = sRealPath.Chars(sRealPath.IndexOf(":") - 1) diff --git a/GBM/Managers/mgrProcessDetection.vb b/GBM/Managers/mgrProcessDetection.vb index b7976b9..52619b2 100644 --- a/GBM/Managers/mgrProcessDetection.vb +++ b/GBM/Managers/mgrProcessDetection.vb @@ -267,8 +267,8 @@ Public Class mgrProcessDetection Dim sParameter As String Dim sWinePath As String() 'The wine-preloader parameters can refer to a path on the host system, windows based path within in the prefix, or mixed notation. - sParameter = sArgs(0).Replace("\", "/") - sWinePath = sParameter.Split("/") + sParameter = sArgs(0).Replace("\", Path.DirectorySeparatorChar) + sWinePath = sParameter.Split(Path.DirectorySeparatorChar) sProcessCheck = Path.GetFileNameWithoutExtension(sWinePath(sWinePath.Length - 1)) bWineProcess = True Else