aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx/Configuration/ConfigurationState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx/Configuration/ConfigurationState.cs')
-rw-r--r--Ryujinx/Configuration/ConfigurationState.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx/Configuration/ConfigurationState.cs b/Ryujinx/Configuration/ConfigurationState.cs
index 9cf3f650..02136591 100644
--- a/Ryujinx/Configuration/ConfigurationState.cs
+++ b/Ryujinx/Configuration/ConfigurationState.cs
@@ -221,6 +221,11 @@ namespace Ryujinx.Configuration
public ReactiveObject<AudioBackend> AudioBackend { get; private set; }
/// <summary>
+ /// The audio backend volume
+ /// </summary>
+ public ReactiveObject<float> AudioVolume { get; private set; }
+
+ /// <summary>
/// The selected memory manager mode
/// </summary>
public ReactiveObject<MemoryManagerMode> MemoryManagerMode { get; private set; }
@@ -257,6 +262,8 @@ namespace Ryujinx.Configuration
ExpandRam.Event += static (sender, e) => LogValueChange(sender, e, nameof(ExpandRam));
IgnoreMissingServices = new ReactiveObject<bool>();
IgnoreMissingServices.Event += static (sender, e) => LogValueChange(sender, e, nameof(IgnoreMissingServices));
+ AudioVolume = new ReactiveObject<float>();
+ AudioVolume.Event += static (sender, e) => LogValueChange(sender, e, nameof(AudioVolume));
}
}
@@ -460,6 +467,7 @@ namespace Ryujinx.Configuration
EnableFsIntegrityChecks = System.EnableFsIntegrityChecks,
FsGlobalAccessLogMode = System.FsGlobalAccessLogMode,
AudioBackend = System.AudioBackend,
+ AudioVolume = System.AudioVolume,
MemoryManagerMode = System.MemoryManagerMode,
ExpandRam = System.ExpandRam,
IgnoreMissingServices = System.IgnoreMissingServices,
@@ -553,6 +561,7 @@ namespace Ryujinx.Configuration
Hid.Hotkeys.Value = new KeyboardHotkeys
{
ToggleVsync = Key.Tab,
+ ToggleMute = Key.F2,
Screenshot = Key.F8,
ShowUi = Key.F4,
Pause = Key.F5
@@ -929,6 +938,24 @@ namespace Ryujinx.Configuration
configurationFileUpdated = true;
}
+ if (configurationFileFormat.Version < 33)
+ {
+ Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 33.");
+
+ configurationFileFormat.Hotkeys = new KeyboardHotkeys
+ {
+ ToggleVsync = configurationFileFormat.Hotkeys.ToggleVsync,
+ Screenshot = configurationFileFormat.Hotkeys.Screenshot,
+ ShowUi = configurationFileFormat.Hotkeys.ShowUi,
+ Pause = configurationFileFormat.Hotkeys.Pause,
+ ToggleMute = Key.F2
+ };
+
+ configurationFileFormat.AudioVolume = 1;
+
+ configurationFileUpdated = true;
+ }
+
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
Graphics.BackendThreading.Value = configurationFileFormat.BackendThreading;
Graphics.ResScale.Value = configurationFileFormat.ResScale;
@@ -960,6 +987,7 @@ namespace Ryujinx.Configuration
System.EnableFsIntegrityChecks.Value = configurationFileFormat.EnableFsIntegrityChecks;
System.FsGlobalAccessLogMode.Value = configurationFileFormat.FsGlobalAccessLogMode;
System.AudioBackend.Value = configurationFileFormat.AudioBackend;
+ System.AudioVolume.Value = configurationFileFormat.AudioVolume;
System.MemoryManagerMode.Value = configurationFileFormat.MemoryManagerMode;
System.ExpandRam.Value = configurationFileFormat.ExpandRam;
System.IgnoreMissingServices.Value = configurationFileFormat.IgnoreMissingServices;