From 7815fd574656e575b1d4b02ceab545b47be905e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Mar 2024 19:45:34 -0300 Subject: [PATCH] Move turbo multiplier setting to CPU tab --- src/Ryujinx/Assets/Locales/en_US.json | 1 + .../UI/Views/Settings/SettingsCPUView.axaml | 47 ++++++++++++++++++- .../Views/Settings/SettingsSystemView.axaml | 34 -------------- src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 10 ++-- 4 files changed, 53 insertions(+), 39 deletions(-) diff --git a/src/Ryujinx/Assets/Locales/en_US.json b/src/Ryujinx/Assets/Locales/en_US.json index d5adf474c..34bdb8083 100644 --- a/src/Ryujinx/Assets/Locales/en_US.json +++ b/src/Ryujinx/Assets/Locales/en_US.json @@ -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", diff --git a/src/Ryujinx/UI/Views/Settings/SettingsCPUView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsCPUView.axaml index c74d3dd57..67bd687c5 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsCPUView.axaml +++ b/src/Ryujinx/UI/Views/Settings/SettingsCPUView.axaml @@ -1,10 +1,11 @@ - @@ -71,6 +72,50 @@ ToolTip.Tip="{locale:Locale UseHypervisorTooltip}" /> + + + + + + + + + + + diff --git a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml index 96d49b78a..e8cab19f4 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml +++ b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml @@ -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 @@ - - - - - - diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index ac77f02ef..233de61f0 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -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); + } } }