Skip to content

Commit

Permalink
Fix issue of settings not applying
Browse files Browse the repository at this point in the history
  • Loading branch information
sabihoshi committed Apr 21, 2021
1 parent 7c5b99f commit 2d0d705
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions GenshinLauncher/GenshinLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<RepositoryUrl>https://github.com/sabihoshi/GenshinLauncher</RepositoryUrl>
<Description>A Genshin Impact launcher with more options in Modern Fluent UI.</Description>
<ApplicationIcon>GenshinImpactIcon.ico</ApplicationIcon>
<Version>1.0.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
25 changes: 13 additions & 12 deletions GenshinLauncher/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ await Client.WithArguments("-show-screen-selector")
public void LaunchGame()
{
var client = Client
.WithArguments(args => args
.Add("-screen-width").Add(Resolution.Width)
.Add("-screen-height").Add(Resolution.Height)
.Add("-screen-fullscreen").Add(Fullscreen ? 1 : 0));

if (Borderless)
client = client.WithArguments(args => args
.Add("-popupwindow"));

if (Quality.SelectedQuality != Models.Quality.Default)
client = client.WithArguments(args => args
.Add("-screen-quality").Add(Quality.SelectedQuality));
.WithArguments(args =>
{
args
.Add("-screen-width").Add(Resolution.Width)
.Add("-screen-height").Add(Resolution.Height)
.Add("-screen-fullscreen").Add(Fullscreen ? 1 : 0);

if (Borderless)
args.Add("-popupwindow");

if (Quality.SelectedQuality != Models.Quality.Default)
args.Add("-screen-quality").Add(Quality.SelectedQuality);
});

_ = client.ExecuteAsync();
}
Expand Down

0 comments on commit 2d0d705

Please sign in to comment.