From 9a1f3370bdf1dae9f7772af60e0a438ac2c79513 Mon Sep 17 00:00:00 2001 From: Premo <38495887+Dansla116@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:22:12 -0400 Subject: [PATCH] Added option to set idle time before cursor is hidden (Ryujinx#4390) In SettingsWindow.cs and SettingsWindow.glade: Replaced Always/On Idle/Never radio buttons with a dropdown (combo box). When selecting "On Idle", a "Seconds" label and numeric text box (spinner) appear. The spinner is limited 1-10. In ConfigurationFileFormat.cs and ConfigurationState.cs, and SettingsViewModel.cs: Load the saved value, or default 5 seconds if no value exists. Save the custom set value to the config file. In SettingsViewModel.cs: Catch when the idle time setting is changed while a game is running, and change the value live. --- .../Configuration/ConfigurationFileFormat.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs index 3387e1be1..aa80ca5d0 100644 --- a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs +++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs @@ -172,6 +172,11 @@ namespace Ryujinx.UI.Common.Configuration /// public HideCursorMode HideCursor { get; set; } + /// + /// How many seconds to wait before hiding the cursor when set to hide on idle + /// + public int HideCursorIdleTime { get; set; } + /// /// Enables or disables Vertical Sync ///