mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-21 04:32:00 +00:00
Move turbo multiplier setting to CPU tab
This commit is contained in:
parent
9c0446ec24
commit
7815fd5746
4 changed files with 53 additions and 39 deletions
|
@ -523,6 +523,7 @@
|
|||
"SettingsTabNetworkConnection": "Network Connection",
|
||||
"SettingsTabCpuCache": "CPU Cache",
|
||||
"SettingsTabCpuMemory": "CPU Mode",
|
||||
"SettingsTabCpuHacks": "Hacks",
|
||||
"DialogUpdaterFlatpakNotSupportedMessage": "Please update Ryujinx via FlatHub.",
|
||||
"UpdaterDisabledWarningTitle": "Updater Disabled!",
|
||||
"ControllerSettingsRotate90": "Rotate 90° Clockwise",
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<UserControl
|
||||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsCPUView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
x:DataType="viewModels:SettingsViewModel">
|
||||
|
@ -71,6 +72,50 @@
|
|||
ToolTip.Tip="{locale:Locale UseHypervisorTooltip}" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Orientation="Vertical"
|
||||
Spacing="2">
|
||||
<TextBlock
|
||||
Classes="h1"
|
||||
Text="{locale:Locale SettingsTabCpuHacks}" />
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource SecondaryTextColor}"
|
||||
Text="{locale:Locale SettingsTabSystemHacksNote}" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,0,0,10"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Text="{locale:Locale SettingsTabSystemTurboMultiplierValue}"
|
||||
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueTooltip}"
|
||||
Width="250" />
|
||||
<ui:NumberBox ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueTooltip}"
|
||||
Value="{Binding TurboMultiplier}"
|
||||
Width="165"
|
||||
SmallChange="1.0"
|
||||
LargeChange="10"
|
||||
SimpleNumberFormat="F0"
|
||||
SpinButtonPlacementMode="Hidden"
|
||||
Minimum="50"
|
||||
Maximum="500" />
|
||||
<Slider Value="{Binding TurboMultiplier}"
|
||||
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierSliderTooltip}"
|
||||
MinWidth="175"
|
||||
Margin="10,-3,0,0"
|
||||
Height="32"
|
||||
Padding="0,-5"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
LargeChange="10"
|
||||
SmallChange="1"
|
||||
VerticalAlignment="Center"
|
||||
Minimum="50"
|
||||
Maximum="500" />
|
||||
<TextBlock Margin="5,0"
|
||||
Width="40"
|
||||
Text="{Binding TurboMultiplierPercentageText}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||
|
@ -219,39 +218,6 @@
|
|||
<TextBlock Text="{locale:Locale SettingsTabSystemIgnoreMissingServices}" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,0,0,10"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
Text="{locale:Locale SettingsTabSystemTurboMultiplierValue}"
|
||||
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueTooltip}"
|
||||
Width="250" />
|
||||
<ui:NumberBox ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueTooltip}"
|
||||
Value="{Binding TurboMultiplier}"
|
||||
Width="165"
|
||||
SmallChange="1.0"
|
||||
LargeChange="10"
|
||||
SimpleNumberFormat="F0"
|
||||
SpinButtonPlacementMode="Hidden"
|
||||
Minimum="50"
|
||||
Maximum="500" />
|
||||
<Slider Value="{Binding TurboMultiplier}"
|
||||
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierSliderTooltip}"
|
||||
MinWidth="175"
|
||||
Margin="10,-3,0,0"
|
||||
Height="32"
|
||||
Padding="0,-5"
|
||||
TickFrequency="1"
|
||||
IsSnapToTickEnabled="True"
|
||||
LargeChange="10"
|
||||
SmallChange="1"
|
||||
VerticalAlignment="Center"
|
||||
Minimum="50"
|
||||
Maximum="500" />
|
||||
<TextBlock Margin="5,0"
|
||||
Width="40"
|
||||
Text="{Binding TurboMultiplierPercentageText}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
|
|
|
@ -11,7 +11,6 @@ using Ryujinx.Ava.UI.Applet;
|
|||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Cpu;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS;
|
||||
|
@ -410,10 +409,13 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
public static void UpdateTurboConfig(long turboMultiplier)
|
||||
{
|
||||
MainWindow.MainWindowViewModel.AppHost.Device.Configuration.TurboMultiplier = turboMultiplier;
|
||||
if (MainWindow.MainWindowViewModel.AppHost.Device.TurboMode)
|
||||
if (MainWindow.MainWindowViewModel.IsGameRunning)
|
||||
{
|
||||
TickSource.s_tickMultiplier = turboMultiplier;
|
||||
MainWindow.MainWindowViewModel.AppHost.Device.Configuration.TurboMultiplier = turboMultiplier;
|
||||
if (MainWindow.MainWindowViewModel.AppHost.Device.TurboMode)
|
||||
{
|
||||
MainWindow.MainWindowViewModel.AppHost.Device.SetTickSourceMultiplier(turboMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue