Skip to content

Commit

Permalink
Enable batch when running without a window.
Browse files Browse the repository at this point in the history
  • Loading branch information
num0005 committed Jun 30, 2024
1 parent b503f74 commit 4952a4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Launcher/ToolkitInterface/H2Toolkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private async Task RunMergeLightmap(string scenario, string bsp, int workerCount

private async Task<Utility.Process.Result> RunLightmapWorker(string scenario, string bsp, string quality, int workerCount, int index, bool useFast, CancellationToken cancelationToken, OutputMode output)
{
this.LogFileSuffix = $"_{index}";
this.LogFileSuffix = $"-{index}";
if (Profile.IsMCC)
{
bool wereWeExperts = Profile.ElevatedToExpert;
Expand Down
6 changes: 3 additions & 3 deletions Launcher/ToolkitInterface/ToolkitBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,14 @@ protected virtual string ToLocalPath(string path)
/// <returns></returns>
public async Task RunCustomToolCommand(string command)
{
await Utility.Process.StartProcessWithShell(BaseDirectory, GetToolExecutable(ToolType.Tool), Utility.Process.EscapeArgList(GetArgsToPrepend(noWindow: false)) + " " + command);
await Utility.Process.StartProcessWithShell(BaseDirectory, GetToolExecutable(ToolType.Tool), Utility.Process.EscapeArgList(GetArgsToPrepend()) + " " + command);
}

/// <summary>
/// Get the args to prepend to every invokaing of a game tool
/// </summary>
/// <returns>List with all the args to add</returns>
private List<string> GetArgsToPrepend(bool noWindow)
private List<string> GetArgsToPrepend(bool hasWindow = true)
{
List<string> args = new();

Expand Down Expand Up @@ -383,7 +383,7 @@ private List<string> GetArgsToPrepend(bool noWindow)
args.Add("-expert_mode");
}

if (Profile.Batch || noWindow)
if (Profile.Batch || !hasWindow)
{
args.Add("-batch");
}
Expand Down

0 comments on commit 4952a4b

Please sign in to comment.