diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs index c21383349..0f45d04d1 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationFileFormat.cs @@ -15,7 +15,7 @@ namespace Ryujinx.Ava.Systems.Configuration /// /// The current version of the file format /// - public const int CurrentVersion = 70; + public const int CurrentVersion = 71; /// /// Version of the configuration file format @@ -217,6 +217,16 @@ namespace Ryujinx.Ava.Systems.Configuration /// public HideCursorMode HideCursor { get; set; } + /// + /// Duration to show controller overlay when game starts (seconds, 0 = disabled) + /// + public int ControllerOverlayGameStartDuration { get; set; } + + /// + /// Duration to show controller overlay when input is cycled (seconds, 0 = disabled) + /// + public int ControllerOverlayInputCycleDuration { get; set; } + /// /// Enables or disables Vertical Sync /// diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs b/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs index afabdb4e3..6ad687688 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationState.Migration.cs @@ -53,6 +53,8 @@ namespace Ryujinx.Ava.Systems.Configuration ShowOldUI.Value = shouldLoadFromFile ? cff.ShowTitleBar : ShowOldUI.Value; // Get from global config only EnableHardwareAcceleration.Value = shouldLoadFromFile ? cff.EnableHardwareAcceleration : EnableHardwareAcceleration.Value; // Get from global config only HideCursor.Value = cff.HideCursor; + ControllerOverlayGameStartDuration.Value = cff.ControllerOverlayGameStartDuration; + ControllerOverlayInputCycleDuration.Value = cff.ControllerOverlayInputCycleDuration; Logger.EnableFileLog.Value = cff.EnableFileLog; Logger.EnableDebug.Value = cff.LoggingEnableDebug; @@ -479,7 +481,12 @@ namespace Ryujinx.Ava.Systems.Configuration }; } ), - (69, static cff => cff.SkipUserProfiles = false) + (69, static cff => cff.SkipUserProfiles = false), + (71, static cff => + { + cff.ControllerOverlayGameStartDuration = 3; + cff.ControllerOverlayInputCycleDuration = 2; + }) ); } } diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs b/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs index 29a390b26..2f9a0787c 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationState.Model.cs @@ -846,6 +846,16 @@ namespace Ryujinx.Ava.Systems.Configuration /// public ReactiveObject HideCursor { get; private set; } + /// + /// Duration to show controller overlay when game starts (seconds, 0 = disabled) + /// + public ReactiveObject ControllerOverlayGameStartDuration { get; private set; } + + /// + /// Duration to show controller overlay when input is cycled (seconds, 0 = disabled) + /// + public ReactiveObject ControllerOverlayInputCycleDuration { get; private set; } + private ConfigurationState() { UI = new UISection(); @@ -863,6 +873,8 @@ namespace Ryujinx.Ava.Systems.Configuration RememberWindowState = new ReactiveObject(); ShowOldUI = new ReactiveObject(); EnableHardwareAcceleration = new ReactiveObject(); + ControllerOverlayGameStartDuration = new ReactiveObject(); + ControllerOverlayInputCycleDuration = new ReactiveObject(); } public HleConfiguration CreateHleConfiguration() => diff --git a/src/Ryujinx/Systems/Configuration/ConfigurationState.cs b/src/Ryujinx/Systems/Configuration/ConfigurationState.cs index 4a565d5d3..71f73bc65 100644 --- a/src/Ryujinx/Systems/Configuration/ConfigurationState.cs +++ b/src/Ryujinx/Systems/Configuration/ConfigurationState.cs @@ -65,6 +65,8 @@ namespace Ryujinx.Ava.Systems.Configuration ShowTitleBar = ShowOldUI, EnableHardwareAcceleration = EnableHardwareAcceleration, HideCursor = HideCursor, + ControllerOverlayGameStartDuration = ControllerOverlayGameStartDuration, + ControllerOverlayInputCycleDuration = ControllerOverlayInputCycleDuration, VSyncMode = Graphics.VSyncMode, EnableCustomVSyncInterval = Graphics.EnableCustomVSyncInterval, CustomVSyncInterval = Graphics.CustomVSyncInterval, @@ -190,6 +192,8 @@ namespace Ryujinx.Ava.Systems.Configuration ShowOldUI.Value = !OperatingSystem.IsWindows(); EnableHardwareAcceleration.Value = true; HideCursor.Value = HideCursorMode.OnIdle; + ControllerOverlayGameStartDuration.Value = 3; + ControllerOverlayInputCycleDuration.Value = 2; Graphics.VSyncMode.Value = VSyncMode.Switch; Graphics.CustomVSyncInterval.Value = 120; Graphics.EnableCustomVSyncInterval.Value = false; diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 654eb0c43..b24b74dcb 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -146,6 +146,8 @@ namespace Ryujinx.Ava.UI.ViewModels public bool EnableMouse { get; set; } public bool DisableInputWhenOutOfFocus { get; set; } public int FocusLostActionType { get; set; } + public int ControllerOverlayGameStartDuration { get; set; } + public int ControllerOverlayInputCycleDuration { get; set; } public bool UseGlobalInputConfig { @@ -587,6 +589,8 @@ namespace Ryujinx.Ava.UI.ViewModels HideCursor = (int)config.HideCursor.Value; UpdateCheckerType = (int)config.UpdateCheckerType.Value; FocusLostActionType = (int)config.FocusLostActionType.Value; + ControllerOverlayGameStartDuration = config.ControllerOverlayGameStartDuration.Value; + ControllerOverlayInputCycleDuration = config.ControllerOverlayInputCycleDuration.Value; GameDirectories.Clear(); GameDirectories.AddRange(config.UI.GameDirs.Value); @@ -698,6 +702,8 @@ namespace Ryujinx.Ava.UI.ViewModels config.HideCursor.Value = (HideCursorMode)HideCursor; config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType; config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType; + config.ControllerOverlayGameStartDuration.Value = ControllerOverlayGameStartDuration; + config.ControllerOverlayInputCycleDuration.Value = ControllerOverlayInputCycleDuration; config.UI.GameDirs.Value = [.. GameDirectories]; config.UI.AutoloadDirs.Value = [.. AutoloadDirectories]; diff --git a/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml index ad05efd06..611e8d196 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml +++ b/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml @@ -157,6 +157,32 @@ + + + + + + + + + + + +