Add hide-cursor command line argument & always hide cursor option (#4613)
* Add hide-cursor command line argument * gtk: Adjust SettingsWindow for hide cursor options * ava: Adjust SettingsWindow for hide cursor options * ava: Add override check for HideCursor arg * Remove copy&paste sins * ava: Leave a little more room between the options * gtk: Fix hide cursor issues * ava: Only hide cursor if it's within the embedded window
This commit is contained in:
parent
2c94ac455e
commit
dd574146fb
20 changed files with 266 additions and 99 deletions
|
@ -52,7 +52,9 @@ namespace Ryujinx.Ui.Windows
|
|||
[GUI] CheckButton _discordToggle;
|
||||
[GUI] CheckButton _checkUpdatesToggle;
|
||||
[GUI] CheckButton _showConfirmExitToggle;
|
||||
[GUI] CheckButton _hideCursorOnIdleToggle;
|
||||
[GUI] RadioButton _hideCursorNever;
|
||||
[GUI] RadioButton _hideCursorOnIdle;
|
||||
[GUI] RadioButton _hideCursorAlways;
|
||||
[GUI] CheckButton _vSyncToggle;
|
||||
[GUI] CheckButton _shaderCacheToggle;
|
||||
[GUI] CheckButton _textureRecompressionToggle;
|
||||
|
@ -226,9 +228,17 @@ namespace Ryujinx.Ui.Windows
|
|||
_showConfirmExitToggle.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.HideCursorOnIdle)
|
||||
switch (ConfigurationState.Instance.HideCursor.Value)
|
||||
{
|
||||
_hideCursorOnIdleToggle.Click();
|
||||
case HideCursorMode.Never:
|
||||
_hideCursorNever.Click();
|
||||
break;
|
||||
case HideCursorMode.OnIdle:
|
||||
_hideCursorOnIdle.Click();
|
||||
break;
|
||||
case HideCursorMode.Always:
|
||||
_hideCursorAlways.Click();
|
||||
break;
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.Graphics.EnableVsync)
|
||||
|
@ -560,6 +570,18 @@ 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;
|
||||
|
@ -602,7 +624,7 @@ namespace Ryujinx.Ui.Windows
|
|||
ConfigurationState.Instance.EnableDiscordIntegration.Value = _discordToggle.Active;
|
||||
ConfigurationState.Instance.CheckUpdatesOnStart.Value = _checkUpdatesToggle.Active;
|
||||
ConfigurationState.Instance.ShowConfirmExit.Value = _showConfirmExitToggle.Active;
|
||||
ConfigurationState.Instance.HideCursorOnIdle.Value = _hideCursorOnIdleToggle.Active;
|
||||
ConfigurationState.Instance.HideCursor.Value = hideCursor;
|
||||
ConfigurationState.Instance.Graphics.EnableVsync.Value = _vSyncToggle.Active;
|
||||
ConfigurationState.Instance.Graphics.EnableShaderCache.Value = _shaderCacheToggle.Active;
|
||||
ConfigurationState.Instance.Graphics.EnableTextureRecompression.Value = _textureRecompressionToggle.Active;
|
||||
|
@ -813,4 +835,4 @@ namespace Ryujinx.Ui.Windows
|
|||
Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue