Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
gunt3001 committed May 11, 2024
2 parents 49d511b + 23c5c7b commit 90d13ae
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 227 deletions.
3 changes: 3 additions & 0 deletions HsrGraphicsTool/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ReactiveUI />
</Weavers>
2 changes: 2 additions & 0 deletions HsrGraphicsTool/HsrGraphicsTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<Version>1.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,5 +23,6 @@
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.10" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
</ItemGroup>
</Project>
9 changes: 5 additions & 4 deletions HsrGraphicsTool/Models/HsrGraphicsConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
/// <summary>
/// Record representing the graphics settings of Honkai: Star Rail
/// </summary>
public record HsrGraphicsConfiguration
public record HsrGraphicsConfiguration(GraphicsPresetOption GraphicsPreset,
HsrResolution Resolution, HsrCustomGraphics CustomGraphics)
{
/// <summary>
/// The in-game "Graphics Quality" option
/// </summary>
public GraphicsPresetOption GraphicsPreset { get; set; }
public GraphicsPresetOption GraphicsPreset { get; } = GraphicsPreset;

/// <summary>
/// Advanced graphics settings when the GraphicsPreset is set to Custom.
/// Known values from the game will be used for other presets from Very Low to Very High.
/// </summary>
public HsrCustomGraphics CustomGraphics { get; set; }
public HsrCustomGraphics CustomGraphics { get; } = CustomGraphics;

/// <summary>
/// The graphics resolution settings
/// </summary>
public HsrResolution Resolution { get; set; }
public HsrResolution Resolution { get; } = Resolution;
}
7 changes: 1 addition & 6 deletions HsrGraphicsTool/Models/Services/HsrRegistryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,7 @@ class HsrRegistryManager : IHsrRegistryManager

// If graphics object is still empty, read default values for the preset
customGraphics ??= GetCustomGraphicsSettingsForPreset(preset);
return new HsrGraphicsConfiguration
{
GraphicsPreset = preset,
Resolution = resolution,
CustomGraphics = customGraphics,
};
return new HsrGraphicsConfiguration(preset, resolution, customGraphics);
}

/// <inheritdoc />
Expand Down
Loading

0 comments on commit 90d13ae

Please sign in to comment.