From c8a40f65c14393c4f1351fa7ba994571f583aafb Mon Sep 17 00:00:00 2001 From: laolarou Date: Sun, 12 Nov 2023 00:21:50 -0800 Subject: [PATCH] fix launch issue --- .../Launch/DefaultLaunchArgumentParser.cs | 2 +- .../DefaultComponent/Launch/GameCore/DefaultGameCore.cs | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLaunchArgumentParser.cs b/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLaunchArgumentParser.cs index f15c91b..46580da 100644 --- a/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLaunchArgumentParser.cs +++ b/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLaunchArgumentParser.cs @@ -128,7 +128,7 @@ public IEnumerable ParseJvmHeadArguments() public IEnumerable ParseJvmArguments() { var versionNameFollowing = string.IsNullOrEmpty(_rootVersion) ? string.Empty : $",{_rootVersion}"; - var versionName = $"{LaunchSettings.Version}{versionNameFollowing}"; + var versionName = $"{LaunchSettings.Version}{versionNameFollowing}".Replace(' ', '_'); var jvmArgumentsDic = new Dictionary { diff --git a/ProjBobcat/ProjBobcat/DefaultComponent/Launch/GameCore/DefaultGameCore.cs b/ProjBobcat/ProjBobcat/DefaultComponent/Launch/GameCore/DefaultGameCore.cs index 328a62b..a6d123b 100644 --- a/ProjBobcat/ProjBobcat/DefaultComponent/Launch/GameCore/DefaultGameCore.cs +++ b/ProjBobcat/ProjBobcat/DefaultComponent/Launch/GameCore/DefaultGameCore.cs @@ -188,14 +188,6 @@ public override async Task LaunchTaskAsync(LaunchSettings? setting var executable = arguments[0]; arguments.RemoveAt(0); - /* - for (var i = 0; i < arguments.Count; i++) - { - if (arguments[i].Contains(' ')) - arguments[i] = $"\"{arguments[i]}\""; - } - */ - //通过String Builder格式化参数。(转化成字符串) //Format the arguments using string builder.(Convert to string) // arguments.ForEach(arg => sb.Append(arg.Trim()).Append(' '));