Add Direct Mouse Support (#2374)
* and direct mouse support * and direct mouse support * hide cursor if mouse enabled * add config * update docs * sorted usings
This commit is contained in:
parent
a10b2c5ff2
commit
77aab9aca3
16 changed files with 200 additions and 32 deletions
|
@ -1150,7 +1150,7 @@ namespace Ryujinx.Ui.Windows
|
|||
|
||||
if (_mainWindow.RendererWidget != null)
|
||||
{
|
||||
_mainWindow.RendererWidget.NpadManager.ReloadConfiguration(newConfig, ConfigurationState.Instance.Hid.EnableKeyboard);
|
||||
_mainWindow.RendererWidget.NpadManager.ReloadConfiguration(newConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse);
|
||||
}
|
||||
|
||||
// Atomically replace and signal input change.
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace Ryujinx.Ui.Windows
|
|||
[GUI] CheckButton _expandRamToggle;
|
||||
[GUI] CheckButton _ignoreToggle;
|
||||
[GUI] CheckButton _directKeyboardAccess;
|
||||
[GUI] CheckButton _directMouseAccess;
|
||||
[GUI] ComboBoxText _systemLanguageSelect;
|
||||
[GUI] ComboBoxText _systemRegionSelect;
|
||||
[GUI] Entry _systemTimeZoneEntry;
|
||||
|
@ -245,6 +246,11 @@ namespace Ryujinx.Ui.Windows
|
|||
_directKeyboardAccess.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.Hid.EnableMouse)
|
||||
{
|
||||
_directMouseAccess.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.Ui.EnableCustomTheme)
|
||||
{
|
||||
_custThemeToggle.Click();
|
||||
|
@ -461,6 +467,7 @@ namespace Ryujinx.Ui.Windows
|
|||
ConfigurationState.Instance.System.ExpandRam.Value = _expandRamToggle.Active;
|
||||
ConfigurationState.Instance.System.IgnoreMissingServices.Value = _ignoreToggle.Active;
|
||||
ConfigurationState.Instance.Hid.EnableKeyboard.Value = _directKeyboardAccess.Active;
|
||||
ConfigurationState.Instance.Hid.EnableMouse.Value = _directMouseAccess.Active;
|
||||
ConfigurationState.Instance.Ui.EnableCustomTheme.Value = _custThemeToggle.Active;
|
||||
ConfigurationState.Instance.System.Language.Value = Enum.Parse<Language>(_systemLanguageSelect.ActiveId);
|
||||
ConfigurationState.Instance.System.Region.Value = Enum.Parse<Configuration.System.Region>(_systemRegionSelect.ActiveId);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.1 -->
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkAdjustment" id="_fsLogSpinAdjustment">
|
||||
|
@ -520,6 +520,22 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="_directMouseAccess">
|
||||
<property name="label" translatable="yes">Direct Mouse Access</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="tooltip-text" translatable="yes">Enable or disable "direct keyboard access (HID) support" (Provides games access to your keyboard as a text entry device)</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">10</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue