mirror of
https://gitlab.com/2009scape/Saradomin-Launcher.git
synced 2026-08-01 14:19:14 -06:00
Merge branch 'fps' into 'master'
Configurable FPS See merge request 2009scape/Saradomin-Launcher!44
This commit is contained in:
commit
010f863f7f
3 changed files with 57 additions and 23 deletions
|
|
@ -36,6 +36,7 @@ namespace Saradomin.Infrastructure.Services
|
|||
{
|
||||
Arguments =
|
||||
$"-Dsun.java2d.uiScale={_settingsService.Client.UiScale} "
|
||||
+ $"-DclientFps={_settingsService.Client.Fps} "
|
||||
+ $"-DclientHomeOverride=\"{_settingsService.Launcher.InstallationDirectory}/\" "
|
||||
+ $"-jar \"{_clientUpdateService.PreferredTargetFilePath}\"",
|
||||
WorkingDirectory = $"{_settingsService.Launcher.InstallationDirectory}",
|
||||
|
|
|
|||
|
|
@ -47,5 +47,8 @@ namespace Saradomin.Model.Settings.Client
|
|||
|
||||
[JsonPropertyName("ui_scale")]
|
||||
public int UiScale { get; set; } = 1;
|
||||
|
||||
[JsonPropertyName("fps")]
|
||||
public int Fps { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -157,28 +157,58 @@
|
|||
DockPanel.Dock="Top"
|
||||
Header="client settings">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0"
|
||||
RowDefinitions="Auto, Auto">
|
||||
<TextBlock Grid.Row="0"
|
||||
Margin="0,0,4,0"
|
||||
Foreground="{StaticResource DarkForegroundBrush}"
|
||||
Text="UI scale" />
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto, *">
|
||||
<Grid Grid.Column="0"
|
||||
RowDefinitions="Auto, Auto">
|
||||
<TextBlock Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,0"
|
||||
Foreground="{StaticResource DarkForegroundBrush}"
|
||||
Text="UI scale" />
|
||||
|
||||
<NumericUpDown Grid.Row="1"
|
||||
Width="55"
|
||||
Height="28"
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Right"
|
||||
AllowSpin="True"
|
||||
Classes="NormalNumericUpDown"
|
||||
ClipValueToMinMax="True"
|
||||
FormatString="0.00"
|
||||
Maximum="4"
|
||||
Minimum="1"
|
||||
ParsingNumberStyle="Integer"
|
||||
ShowButtonSpinner="True"
|
||||
Value="{Binding Client.UiScale, Mode=TwoWay}" />
|
||||
<NumericUpDown Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Width="55"
|
||||
Height="28"
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Right"
|
||||
AllowSpin="True"
|
||||
Classes="NormalNumericUpDown"
|
||||
ClipValueToMinMax="True"
|
||||
FormatString="0.00"
|
||||
Maximum="4"
|
||||
Minimum="1"
|
||||
ParsingNumberStyle="Integer"
|
||||
ShowButtonSpinner="True"
|
||||
Value="{Binding Client.UiScale, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1"
|
||||
RowDefinitions="Auto, Auto">
|
||||
<TextBlock Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="0,0,4,0"
|
||||
Foreground="{StaticResource DarkForegroundBrush}"
|
||||
Text="Target FPS (0=auto)" />
|
||||
|
||||
<NumericUpDown Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Width="55"
|
||||
Height="28"
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Right"
|
||||
AllowSpin="True"
|
||||
Classes="NormalNumericUpDown"
|
||||
ClipValueToMinMax="True"
|
||||
FormatString="0"
|
||||
Maximum="1000"
|
||||
Minimum="0"
|
||||
ParsingNumberStyle="Integer"
|
||||
ShowButtonSpinner="True"
|
||||
Value="{Binding Client.Fps, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<HeaderedContentControl Grid.Row="1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue