Skip to content

Commit

Permalink
Me not testing things properly
Browse files Browse the repository at this point in the history
  • Loading branch information
tstavrianos committed Apr 27, 2020
1 parent 25682fd commit 6a73916
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions BannerLord.Common/ModManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public bool Run(string gameExe, string extraGameArguments, out string errorMessa
errorMessage = default;
if (!this._client.CanRun(gameExe, extraGameArguments)) return false;

gameExe ??= "Bannerlord.exe";
var actualGameExe = Path.Combine(this.GameExeFolder, gameExe);
if (string.IsNullOrEmpty(actualGameExe))
{
Expand Down Expand Up @@ -148,6 +149,7 @@ public bool Run(string gameExe, string extraGameArguments, out string errorMessa
//
}

extraGameArguments ??= "";
var args = extraGameArguments.Trim() + " " + this.GameArguments().Trim();
this.Log().Warn($"Trying to execute: {actualGameExe} {args}");
var info = new ProcessStartInfo
Expand Down
2 changes: 1 addition & 1 deletion BannerLordLauncher/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void Initialize()

private void RunCmd()
{
if (!this.Manager.Run(this._window.Configuration.GameExeId == 1 ? "Bannerlord_Native.exe" : "Bannerlord.exe", this._window.Configuration.ExtraGameArguments, out var error))
if (!this.Manager.Run(this._window.Configuration.GameExeId == 1 ? "Bannerlord.Native.exe" : "Bannerlord.exe", this._window.Configuration.ExtraGameArguments, out var error))
{
if (!string.IsNullOrEmpty(error)) this.SafeMessage(error);
return;
Expand Down
2 changes: 1 addition & 1 deletion BannerLordLauncher/Views/OptionsDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<TextBlock Grid.Column="0" Grid.Row="6" Text="Game exe to use" Foreground="{DynamicResource PackIconMaterialForeground1}" FontSize="14"/>
<ComboBox Grid.Column="1" Grid.Row="6" Style="{StaticResource SimpleComboBox}" SelectedIndex="{Binding Path=Config.GameExeId}" Margin="0,0,5,0" Foreground="{DynamicResource ModListItemNative}" Background="{DynamicResource StackPanelBackground1}" BorderBrush="{DynamicResource PackIconMaterialBorderBrush1}">
<ComboBoxItem Style="{StaticResource SimpleComboBoxItem}">BannerLord.exe</ComboBoxItem>
<ComboBoxItem Style="{StaticResource SimpleComboBoxItem}" Background="{DynamicResource StackPanelBackground1}" BorderBrush="{DynamicResource PackIconMaterialBorderBrush1}">BannerLord_Native.exe</ComboBoxItem>
<ComboBoxItem Style="{StaticResource SimpleComboBoxItem}">BannerLord.Native.exe</ComboBoxItem>
</ComboBox>

<TextBlock Grid.Column="0" Grid.Row="8" Text="Check for updates at startup" Foreground="{DynamicResource PackIconMaterialForeground1}" FontSize="14"/>
Expand Down

0 comments on commit 6a73916

Please sign in to comment.