|
|
@@ -40,8 +40,7 @@ namespace GCMM |
|
|
|
if (line.StartsWith("133062..GAME_PATH=") && line.Contains('/')) |
|
|
|
{ |
|
|
|
gamePathSet = true; |
|
|
|
return |
|
|
|
$"{line.Substring(0, Math.Max(line.LastIndexOf("TBMM", StringComparison.Ordinal), line.Length))}{(enable ? "TBMM/" : "")}"; |
|
|
|
return $"{line.Replace("/TBMM/", "/")}{(enable ? "TBMM/" : "")}"; |
|
|
|
} |
|
|
|
|
|
|
|
return line; |
|
|
@@ -50,7 +49,7 @@ namespace GCMM |
|
|
|
} |
|
|
|
|
|
|
|
return gamePathSet; |
|
|
|
} |
|
|
|
} //TODO: Setting the game path might not be a good idea because of updates... |
|
|
|
|
|
|
|
public void EnableDisableAutoPatchingWithDialog(bool enable) |
|
|
|
{ |
|
|
@@ -73,7 +72,7 @@ namespace GCMM |
|
|
|
if (!File.Exists(launcherConfig)) return null; |
|
|
|
string path = File.ReadLines(launcherConfig) |
|
|
|
.FirstOrDefault(line => line.StartsWith("133062..GAME_PATH=")) |
|
|
|
?.Substring("133062..GAME_PATH=".Length); |
|
|
|
?.Substring("133062..GAME_PATH=".Length).Replace("/TBMM/", "/") + "StandaloneWindows64"; |
|
|
|
if (path != null && GetExe(path) != null) return path; |
|
|
|
return null; |
|
|
|
} |
|
|
|