mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 10:21:02 +02:00
Add Turbo Mode to CPU settings
This commit is contained in:
@@ -78,6 +78,7 @@ namespace Ryujinx.UI.Common.Helper
|
|||||||
ConfigurationState.Instance.System.EnableLowPowerPptc.Value = customSettingsModel.EnableLowPowerPptc;
|
ConfigurationState.Instance.System.EnableLowPowerPptc.Value = customSettingsModel.EnableLowPowerPptc;
|
||||||
ConfigurationState.Instance.System.MemoryManagerMode.Value = (MemoryManagerMode)customSettingsModel.MemoryManagerMode;
|
ConfigurationState.Instance.System.MemoryManagerMode.Value = (MemoryManagerMode)customSettingsModel.MemoryManagerMode;
|
||||||
ConfigurationState.Instance.System.UseHypervisor.Value = customSettingsModel.UseHypervisor;
|
ConfigurationState.Instance.System.UseHypervisor.Value = customSettingsModel.UseHypervisor;
|
||||||
|
ConfigurationState.Instance.System.TickScalar.Value = customSettingsModel.TickScalar;
|
||||||
ConfigurationState.Instance.System.AudioBackend.Value = customSettingsModel.AudioBackend;
|
ConfigurationState.Instance.System.AudioBackend.Value = customSettingsModel.AudioBackend;
|
||||||
ConfigurationState.Instance.System.AudioVolume.Value = customSettingsModel.AudioVolume;
|
ConfigurationState.Instance.System.AudioVolume.Value = customSettingsModel.AudioVolume;
|
||||||
ConfigurationState.Instance.Graphics.GraphicsBackend.Value = (GraphicsBackend)customSettingsModel.GraphicsBackend;
|
ConfigurationState.Instance.Graphics.GraphicsBackend.Value = (GraphicsBackend)customSettingsModel.GraphicsBackend;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace Ryujinx.UI.Common.Models
|
|||||||
public bool EnableLowPowerPptc { get; set; }
|
public bool EnableLowPowerPptc { get; set; }
|
||||||
public int MemoryManagerMode { get; set; }
|
public int MemoryManagerMode { get; set; }
|
||||||
public bool UseHypervisor { get; set; }
|
public bool UseHypervisor { get; set; }
|
||||||
|
public long TickScalar { get; set; }
|
||||||
public int GraphicsBackend { get; set; }
|
public int GraphicsBackend { get; set; }
|
||||||
public string PreferredGpu { get; set; }
|
public string PreferredGpu { get; set; }
|
||||||
public bool EnableShaderCache { get; set; }
|
public bool EnableShaderCache { get; set; }
|
||||||
@@ -28,9 +29,6 @@ namespace Ryujinx.UI.Common.Models
|
|||||||
public float ResScale { get; set; }
|
public float ResScale { get; set; }
|
||||||
public float MaxAnisotropy { get; set; }
|
public float MaxAnisotropy { get; set; }
|
||||||
public int BackendThreading { get; set; }
|
public int BackendThreading { get; set; }
|
||||||
public int IsOpenAlEnabled { get; set; }
|
|
||||||
public int IsSDL2Enabled { get; set; }
|
|
||||||
public int IsSoundIoEnabled { get; set; }
|
|
||||||
public AudioBackend AudioBackend { get; set; }
|
public AudioBackend AudioBackend { get; set; }
|
||||||
public float AudioVolume { get; set; }
|
public float AudioVolume { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,10 +116,28 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
public int DramSize { get; set; }
|
public int DramSize { get; set; }
|
||||||
public bool EnableFsIntegrityChecks { get; set; }
|
public bool EnableFsIntegrityChecks { get; set; }
|
||||||
public bool IgnoreMissingServices { get; set; }
|
public bool IgnoreMissingServices { get; set; }
|
||||||
|
|
||||||
|
// CPU settings
|
||||||
public bool EnablePptc { get; set; }
|
public bool EnablePptc { get; set; }
|
||||||
public bool EnableLowPowerPptc { get; set; }
|
public bool EnableLowPowerPptc { get; set; }
|
||||||
public int MemoryManagerMode { get; set; }
|
public int MemoryManagerMode { get; set; }
|
||||||
public bool UseHypervisor { get; set; }
|
public bool UseHypervisor { get; set; }
|
||||||
|
public long TurboMultiplier
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (field != value)
|
||||||
|
{
|
||||||
|
field = value;
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
|
OnPropertyChanged((nameof(TurboMultiplierPercentageText)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string TurboMultiplierPercentageText => $"{TurboMultiplier}%";
|
||||||
|
|
||||||
// Graphics settings
|
// Graphics settings
|
||||||
public int VSyncMode { get; set; }
|
public int VSyncMode { get; set; }
|
||||||
@@ -235,6 +253,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
EnableLowPowerPptc = config.System.EnableLowPowerPptc.Value;
|
EnableLowPowerPptc = config.System.EnableLowPowerPptc.Value;
|
||||||
MemoryManagerMode = (int)config.System.MemoryManagerMode.Value;
|
MemoryManagerMode = (int)config.System.MemoryManagerMode.Value;
|
||||||
UseHypervisor = config.System.UseHypervisor.Value;
|
UseHypervisor = config.System.UseHypervisor.Value;
|
||||||
|
TurboMultiplier = config.System.TickScalar.Value;
|
||||||
GraphicsBackend = (int)config.Graphics.GraphicsBackend.Value;
|
GraphicsBackend = (int)config.Graphics.GraphicsBackend.Value;
|
||||||
PreferredGpuIndex = ComputePreferredGpuIndex(config.Graphics.PreferredGpu.Value);
|
PreferredGpuIndex = ComputePreferredGpuIndex(config.Graphics.PreferredGpu.Value);
|
||||||
EnableShaderCache = config.Graphics.EnableShaderCache.Value;
|
EnableShaderCache = config.Graphics.EnableShaderCache.Value;
|
||||||
@@ -261,6 +280,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
EnableLowPowerPptc = CustomSettingsModel.EnableLowPowerPptc;
|
EnableLowPowerPptc = CustomSettingsModel.EnableLowPowerPptc;
|
||||||
MemoryManagerMode = CustomSettingsModel.MemoryManagerMode;
|
MemoryManagerMode = CustomSettingsModel.MemoryManagerMode;
|
||||||
UseHypervisor = CustomSettingsModel.UseHypervisor;
|
UseHypervisor = CustomSettingsModel.UseHypervisor;
|
||||||
|
TurboMultiplier = CustomSettingsModel.TickScalar;
|
||||||
GraphicsBackend = CustomSettingsModel.GraphicsBackend;
|
GraphicsBackend = CustomSettingsModel.GraphicsBackend;
|
||||||
PreferredGpuIndex = ComputePreferredGpuIndex(CustomSettingsModel.PreferredGpu);
|
PreferredGpuIndex = ComputePreferredGpuIndex(CustomSettingsModel.PreferredGpu);
|
||||||
EnableShaderCache = CustomSettingsModel.EnableShaderCache;
|
EnableShaderCache = CustomSettingsModel.EnableShaderCache;
|
||||||
@@ -297,6 +317,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
CustomSettingsModel.EnableLowPowerPptc = EnableLowPowerPptc;
|
CustomSettingsModel.EnableLowPowerPptc = EnableLowPowerPptc;
|
||||||
CustomSettingsModel.MemoryManagerMode = MemoryManagerMode;
|
CustomSettingsModel.MemoryManagerMode = MemoryManagerMode;
|
||||||
CustomSettingsModel.UseHypervisor = UseHypervisor;
|
CustomSettingsModel.UseHypervisor = UseHypervisor;
|
||||||
|
CustomSettingsModel.TickScalar = TurboMultiplier;
|
||||||
CustomSettingsModel.GraphicsBackend = GraphicsBackend;
|
CustomSettingsModel.GraphicsBackend = GraphicsBackend;
|
||||||
CustomSettingsModel.PreferredGpu = ComputePreferredGpu(PreferredGpuIndex);
|
CustomSettingsModel.PreferredGpu = ComputePreferredGpu(PreferredGpuIndex);
|
||||||
CustomSettingsModel.EnableShaderCache = EnableShaderCache;
|
CustomSettingsModel.EnableShaderCache = EnableShaderCache;
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:DataType="viewModels:CustomSettingsViewModel">
|
x:DataType="viewModels:CustomSettingsViewModel">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:CustomSettingsViewModel />
|
<viewModels:SettingsViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
Name="CpuPage"
|
Name="CpuPage"
|
||||||
@@ -70,6 +71,57 @@
|
|||||||
ToolTip.Tip="{locale:Locale UseHypervisorTooltip}" />
|
ToolTip.Tip="{locale:Locale UseHypervisorTooltip}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<Separator Height="1" />
|
||||||
|
<StackPanel
|
||||||
|
Orientation="Vertical"
|
||||||
|
Spacing="5">
|
||||||
|
<TextBlock
|
||||||
|
Classes="h1"
|
||||||
|
Text="{locale:Locale SettingsTabSystemHacks}" />
|
||||||
|
<TextBlock
|
||||||
|
Foreground="{DynamicResource SecondaryTextColor}"
|
||||||
|
TextDecorations="Underline"
|
||||||
|
Text="{locale:Locale SettingsTabSystemHacksNote}" />
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Orientation="Vertical">
|
||||||
|
<StackPanel Margin="0,0,0,10"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
Text="{locale:Locale SettingsTabSystemTurboMultiplier}"
|
||||||
|
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierToolTip}"
|
||||||
|
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="1000" />
|
||||||
|
<Slider Value="{Binding TurboMultiplier}"
|
||||||
|
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueToolTip}"
|
||||||
|
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="1000" />
|
||||||
|
<TextBlock Margin="5,0"
|
||||||
|
Width="40"
|
||||||
|
Text="{Binding TurboMultiplierPercentageText}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
Reference in New Issue
Block a user