Compare commits

...

12 Commits

Author SHA1 Message Date
Premo 09945f96ae
Merge cf1d9945f1 into a23d8cb92f 2024-05-08 11:19:18 -03:00
Marco Carvalho a23d8cb92f
Replace "List.ForEach" for "foreach" (#6783)
* Replace "List.ForEach" for "foreach"

* dotnet format

* Update Ptc.cs

* Update GpuContext.cs
2024-05-08 13:53:25 +02:00
Premo cf1d9945f1
Merge branch 'Ryujinx:master' into master 2024-04-30 09:57:17 -04:00
Premo 40ccfb2e73
Merge branch 'master' into master 2024-04-26 21:28:57 -04:00
Premo 6a313f25da
Removed unused spin adjustment variable 2024-04-25 21:35:00 -04:00
Premo ef513751be
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.
2024-04-25 21:22:35 -04:00
Premo 9a1f3370bd
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.
2024-04-25 21:22:12 -04:00
Premo f514b51079
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.
2024-04-25 21:21:25 -04:00
Premo f90cb93def
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.
2024-04-25 21:21:02 -04:00
Premo 43346cb269
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.
2024-04-25 21:20:16 -04:00
Premo 28c4d80865
Added option to set idle time before cursor is hidden
Fixes #4930

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.
2024-04-25 21:18:26 -04:00
Premo e00f7518c3
Added option to set idle time before cursor is hidden
Fixes #4930

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.
2024-04-25 21:17:18 -04:00
8 changed files with 191 additions and 164 deletions

View File

@ -857,8 +857,14 @@ namespace ARMeilleure.Translation.PTC
Stopwatch sw = Stopwatch.StartNew();
threads.ForEach((thread) => thread.Start());
threads.ForEach((thread) => thread.Join());
foreach (var thread in threads)
{
thread.Start();
}
foreach (var thread in threads)
{
thread.Join();
}
threads.Clear();

View File

@ -395,8 +395,14 @@ namespace Ryujinx.Graphics.Gpu
{
Renderer.CreateSync(SyncNumber, strict);
SyncActions.ForEach(action => action.SyncPreAction(syncpoint));
SyncpointActions.ForEach(action => action.SyncPreAction(syncpoint));
foreach (var action in SyncActions)
{
action.SyncPreAction(syncpoint);
}
foreach (var action in SyncpointActions)
{
action.SyncPreAction(syncpoint);
}
SyncNumber++;

View File

@ -70,10 +70,10 @@ namespace Ryujinx.UI
private readonly CancellationTokenSource _gpuCancellationTokenSource;
// Hide Cursor
const int CursorHideIdleTime = 5; // seconds
private static readonly Cursor _invisibleCursor = new(Display.Default, CursorType.BlankCursor);
private long _lastCursorMoveTime;
private HideCursorMode _hideCursorMode;
private int _hideCursorIdleTime;
private readonly InputManager _inputManager;
private readonly IKeyboard _keyboardInterface;
private readonly GraphicsDebugLevel _glLogLevel;
@ -116,9 +116,12 @@ namespace Ryujinx.UI
_gpuCancellationTokenSource = new CancellationTokenSource();
_hideCursorMode = ConfigurationState.Instance.HideCursor;
_hideCursorIdleTime = ConfigurationState.Instance.HideCursorIdleTime;
_lastCursorMoveTime = Stopwatch.GetTimestamp();
ConfigurationState.Instance.HideCursor.Event += HideCursorStateChanged;
ConfigurationState.Instance.HideCursorIdleTime.Event += HideCursorIdleTimeStateChanged;
ConfigurationState.Instance.Graphics.AntiAliasing.Event += UpdateAnriAliasing;
ConfigurationState.Instance.Graphics.ScalingFilter.Event += UpdateScalingFilter;
ConfigurationState.Instance.Graphics.ScalingFilterLevel.Event += UpdateScalingFilterLevel;
@ -170,9 +173,18 @@ namespace Ryujinx.UI
});
}
private void HideCursorIdleTimeStateChanged(object sender, ReactiveEventArgs<int> state)
{
Application.Invoke(delegate
{
_hideCursorIdleTime = state.NewValue;
});
}
private void Renderer_Destroyed(object sender, EventArgs e)
{
ConfigurationState.Instance.HideCursor.Event -= HideCursorStateChanged;
ConfigurationState.Instance.HideCursorIdleTime.Event -= HideCursorIdleTimeStateChanged;
ConfigurationState.Instance.Graphics.AntiAliasing.Event -= UpdateAnriAliasing;
ConfigurationState.Instance.Graphics.ScalingFilter.Event -= UpdateScalingFilter;
ConfigurationState.Instance.Graphics.ScalingFilterLevel.Event -= UpdateScalingFilterLevel;
@ -335,7 +347,7 @@ namespace Ryujinx.UI
{
case HideCursorMode.OnIdle:
long cursorMoveDelta = Stopwatch.GetTimestamp() - _lastCursorMoveTime;
Window.Cursor = (cursorMoveDelta >= CursorHideIdleTime * Stopwatch.Frequency) ? _invisibleCursor : null;
Window.Cursor = (cursorMoveDelta >= _hideCursorIdleTime * Stopwatch.Frequency) ? _invisibleCursor : null;
break;
case HideCursorMode.Always:
Window.Cursor = _invisibleCursor;

View File

@ -53,9 +53,9 @@ namespace Ryujinx.UI.Windows
[GUI] CheckButton _discordToggle;
[GUI] CheckButton _checkUpdatesToggle;
[GUI] CheckButton _showConfirmExitToggle;
[GUI] RadioButton _hideCursorNever;
[GUI] RadioButton _hideCursorOnIdle;
[GUI] RadioButton _hideCursorAlways;
[GUI] ComboBoxText _hideCursorSelect;
[GUI] Box _hideCursorIdleTimeBox;
[GUI] Entry _hideCursorIdleTimeSpin;
[GUI] CheckButton _vSyncToggle;
[GUI] CheckButton _shaderCacheToggle;
[GUI] CheckButton _textureRecompressionToggle;
@ -147,6 +147,7 @@ namespace Ryujinx.UI.Windows
_configureControllerH.Pressed += (sender, args) => ConfigureController_Pressed(sender, PlayerIndex.Handheld);
_systemTimeZoneEntry.FocusOutEvent += TimeZoneEntry_FocusOut;
_hideCursorSelect.Changed += (sender, args) => _hideCursorIdleTimeBox.Visible = _hideCursorSelect.ActiveId == HideCursorMode.OnIdle.ToString();
_resScaleCombo.Changed += (sender, args) => _resScaleText.Visible = _resScaleCombo.ActiveId == "-1";
_scalingFilter.Changed += (sender, args) => _scalingFilterSlider.Visible = _scalingFilter.ActiveId == "2";
_galThreading.Changed += (sender, args) =>
@ -230,19 +231,6 @@ namespace Ryujinx.UI.Windows
_showConfirmExitToggle.Click();
}
switch (ConfigurationState.Instance.HideCursor.Value)
{
case HideCursorMode.Never:
_hideCursorNever.Click();
break;
case HideCursorMode.OnIdle:
_hideCursorOnIdle.Click();
break;
case HideCursorMode.Always:
_hideCursorAlways.Click();
break;
}
if (ConfigurationState.Instance.Graphics.EnableVsync)
{
_vSyncToggle.Click();
@ -349,6 +337,7 @@ namespace Ryujinx.UI.Windows
_systemTimeZoneCompletion.MatchFunc = TimeZoneMatchFunc;
_hideCursorSelect.SetActiveId(ConfigurationState.Instance.HideCursor.Value.ToString());
_systemLanguageSelect.SetActiveId(ConfigurationState.Instance.System.Language.Value.ToString());
_systemRegionSelect.SetActiveId(ConfigurationState.Instance.System.Region.Value.ToString());
_galThreading.SetActiveId(ConfigurationState.Instance.Graphics.BackendThreading.Value.ToString());
@ -366,6 +355,8 @@ namespace Ryujinx.UI.Windows
_multiLanSelect.SetActiveId(ConfigurationState.Instance.Multiplayer.LanInterfaceId.Value);
_multiModeSelect.SetActiveId(ConfigurationState.Instance.Multiplayer.Mode.Value.ToString());
_hideCursorIdleTimeBox.Visible = _hideCursorSelect.ActiveId == HideCursorMode.OnIdle.ToString();
_hideCursorIdleTimeSpin.Buffer.Text = ConfigurationState.Instance.HideCursorIdleTime.Value.ToString();
_custThemePath.Buffer.Text = ConfigurationState.Instance.UI.CustomThemePath;
_resScaleText.Buffer.Text = ConfigurationState.Instance.Graphics.ResScaleCustom.Value.ToString();
_scalingFilterLevel.Value = ConfigurationState.Instance.Graphics.ScalingFilterLevel.Value;
@ -573,18 +564,6 @@ namespace Ryujinx.UI.Windows
_directoryChanged = false;
}
HideCursorMode hideCursor = HideCursorMode.Never;
if (_hideCursorOnIdle.Active)
{
hideCursor = HideCursorMode.OnIdle;
}
if (_hideCursorAlways.Active)
{
hideCursor = HideCursorMode.Always;
}
if (!float.TryParse(_resScaleText.Buffer.Text, out float resScaleCustom) || resScaleCustom <= 0.0f)
{
resScaleCustom = 1.0f;
@ -627,7 +606,8 @@ namespace Ryujinx.UI.Windows
ConfigurationState.Instance.EnableDiscordIntegration.Value = _discordToggle.Active;
ConfigurationState.Instance.CheckUpdatesOnStart.Value = _checkUpdatesToggle.Active;
ConfigurationState.Instance.ShowConfirmExit.Value = _showConfirmExitToggle.Active;
ConfigurationState.Instance.HideCursor.Value = hideCursor;
ConfigurationState.Instance.HideCursor.Value = Enum.Parse<HideCursorMode>(_hideCursorSelect.ActiveId);
ConfigurationState.Instance.HideCursorIdleTime.Value = int.Parse(_hideCursorIdleTimeSpin.Buffer.Text);
ConfigurationState.Instance.Graphics.EnableVsync.Value = _vSyncToggle.Active;
ConfigurationState.Instance.Graphics.EnableShaderCache.Value = _shaderCacheToggle.Active;
ConfigurationState.Instance.Graphics.EnableTextureRecompression.Value = _textureRecompressionToggle.Active;

View File

@ -2,6 +2,12 @@
<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="_hideCursorIdleTimeSpinAdjustment">
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step-increment">1</property>
<property name="page-increment">1</property>
</object>
<object class="GtkAdjustment" id="_fsLogSpinAdjustment">
<property name="upper">3</property>
<property name="step-increment">1</property>
@ -104,147 +110,147 @@
</packing>
</child>
<child>
<object class="GtkBox" id="General">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="_discordToggle">
<property name="label" translatable="yes">Enable Discord Rich Presence</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Choose whether or not to display Ryujinx on your "currently playing" Discord activity</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="_checkUpdatesToggle">
<property name="label" translatable="yes">Check for Updates on Launch</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="_showConfirmExitToggle">
<property name="label" translatable="yes">Show "Confirm Exit" Dialog</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox" id="_hideCursorBox">
<object class="GtkBox" id="General">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Hide Cursor:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">2</property>
</packing>
<object class="GtkCheckButton" id="_discordToggle">
<property name="label" translatable="yes">Enable Discord Rich Presence</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Choose whether or not to display Ryujinx on your "currently playing" Discord activity</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="_hideCursorNever">
<property name="label" translatable="yes">Never</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
<object class="GtkCheckButton" id="_checkUpdatesToggle">
<property name="label" translatable="yes">Check for Updates on Launch</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="_hideCursorOnIdle">
<property name="label" translatable="yes">On Idle</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="draw-indicator">True</property>
<property name="group">_hideCursorNever</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
<object class="GtkCheckButton" id="_showConfirmExitToggle">
<property name="label" translatable="yes">Show "Confirm Exit" Dialog</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="_hideCursorAlways">
<property name="label" translatable="yes">Always</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="draw-indicator">True</property>
<property name="group">_hideCursorNever</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
<object class="GtkBox" id="_hideCursorBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="tooltip-text" translatable="yes">Whether to hide cursor on idle, always or never</property>
<property name="label" translatable="yes">Hide Cursor:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="_hideCursorSelect">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="width-request">100</property>
<property name="tooltip-text" translatable="yes">Whether to hide cursor on idle, always or never</property>
<items>
<item id="Never" translatable="yes">Never</item>
<item id="OnIdle" translatable="yes">On Idle</item>
<item id="Always" translatable="yes">Always</item>
</items>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="_hideCursorIdleTimeBox">
<property name="visible">False</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">5</property>
<property name="tooltip-text" translatable="yes">How many seconds to wait before hiding the cursor</property>
<property name="label" translatable="yes">Seconds:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="_hideCursorIdleTimeSpin">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">How many seconds to wait before hiding the cursor</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">_hideCursorIdleTimeSpinAdjustment</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</packing>
</child>
</object>
<packing>

View File

@ -177,6 +177,11 @@ namespace Ryujinx.UI.Common.Configuration
/// </summary>
public HideCursorMode HideCursor { get; set; }
/// <summary>
/// How many seconds to wait before hiding the cursor when set to hide on idle
/// </summary>
public int HideCursorIdleTime { get; set; }
/// <summary>
/// Enables or disables Vertical Sync
/// </summary>

View File

@ -637,10 +637,15 @@ namespace Ryujinx.UI.Common.Configuration
public ReactiveObject<bool> EnableHardwareAcceleration { get; private set; }
/// <summary>
/// Hide Cursor on Idle
/// Whether to hide cursor on idle, always or never
/// </summary>
public ReactiveObject<HideCursorMode> HideCursor { get; private set; }
/// <summary>
/// How many seconds to wait before hiding the cursor when set to hide on idle
/// </summary>
public ReactiveObject<int> HideCursorIdleTime { get; private set; }
private ConfigurationState()
{
UI = new UISection();
@ -655,6 +660,7 @@ namespace Ryujinx.UI.Common.Configuration
RememberWindowState = new ReactiveObject<bool>();
EnableHardwareAcceleration = new ReactiveObject<bool>();
HideCursor = new ReactiveObject<HideCursorMode>();
HideCursorIdleTime = new ReactiveObject<int>();
}
public ConfigurationFileFormat ToFileFormat()
@ -693,6 +699,7 @@ namespace Ryujinx.UI.Common.Configuration
RememberWindowState = RememberWindowState,
EnableHardwareAcceleration = EnableHardwareAcceleration,
HideCursor = HideCursor,
HideCursorIdleTime = HideCursorIdleTime,
EnableVsync = Graphics.EnableVsync,
EnableShaderCache = Graphics.EnableShaderCache,
EnableTextureRecompression = Graphics.EnableTextureRecompression,
@ -802,6 +809,7 @@ namespace Ryujinx.UI.Common.Configuration
RememberWindowState.Value = true;
EnableHardwareAcceleration.Value = true;
HideCursor.Value = HideCursorMode.OnIdle;
HideCursorIdleTime.Value = 5;
Graphics.EnableVsync.Value = true;
Graphics.EnableShaderCache.Value = true;
Graphics.EnableTextureRecompression.Value = false;
@ -1509,6 +1517,7 @@ namespace Ryujinx.UI.Common.Configuration
RememberWindowState.Value = configurationFileFormat.RememberWindowState;
EnableHardwareAcceleration.Value = configurationFileFormat.EnableHardwareAcceleration;
HideCursor.Value = configurationFileFormat.HideCursor;
HideCursorIdleTime.Value = configurationFileFormat.HideCursorIdleTime;
Graphics.EnableVsync.Value = configurationFileFormat.EnableVsync;
Graphics.EnableShaderCache.Value = configurationFileFormat.EnableShaderCache;
Graphics.EnableTextureRecompression.Value = configurationFileFormat.EnableTextureRecompression;

View File

@ -133,6 +133,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool ShowConfirmExit { get; set; }
public bool RememberWindowState { get; set; }
public int HideCursor { get; set; }
public int HideCursorIdleTime { get; set; }
public bool EnableDockedMode { get; set; }
public bool EnableKeyboard { get; set; }
public bool EnableMouse { get; set; }
@ -393,6 +394,7 @@ namespace Ryujinx.Ava.UI.ViewModels
ShowConfirmExit = config.ShowConfirmExit;
RememberWindowState = config.RememberWindowState;
HideCursor = (int)config.HideCursor.Value;
HideCursorIdleTime = (int)config.HideCursorIdleTime.Value;
GameDirectories.Clear();
GameDirectories.AddRange(config.UI.GameDirs.Value);
@ -479,6 +481,7 @@ namespace Ryujinx.Ava.UI.ViewModels
config.ShowConfirmExit.Value = ShowConfirmExit;
config.RememberWindowState.Value = RememberWindowState;
config.HideCursor.Value = (HideCursorMode)HideCursor;
config.HideCursorIdleTime.Value = HideCursorIdleTime;
if (_directoryChanged)
{