mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-05 11:59:15 +00:00
Rename and privatize input device refresh helper
This commit is contained in:
@@ -291,7 +291,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
|
|
||||||
public void ResetCurrentDeviceToDefaults()
|
public void ResetCurrentDeviceToDefaults()
|
||||||
{
|
{
|
||||||
LoadDevices();
|
RefreshAvailableDevices();
|
||||||
|
|
||||||
if (_device <= 0 || _device >= Devices.Count || Devices[_device].Type == DeviceType.None)
|
if (_device <= 0 || _device >= Devices.Count || Devices[_device].Type == DeviceType.None)
|
||||||
{
|
{
|
||||||
@@ -352,7 +352,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
|
|
||||||
_isLoaded = false;
|
_isLoaded = false;
|
||||||
|
|
||||||
LoadDevices();
|
RefreshAvailableDevices();
|
||||||
|
|
||||||
PlayerId = PlayerIndex.Player1;
|
PlayerId = PlayerIndex.Player1;
|
||||||
}
|
}
|
||||||
@@ -573,7 +573,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
|
|
||||||
bool shouldApplyKeyboardFallback = Config is StandardControllerInputConfig controllerConfig && controllerConfig.Id == id;
|
bool shouldApplyKeyboardFallback = Config is StandardControllerInputConfig controllerConfig && controllerConfig.Id == id;
|
||||||
|
|
||||||
LoadDevices();
|
RefreshAvailableDevices();
|
||||||
|
|
||||||
if (shouldApplyKeyboardFallback)
|
if (shouldApplyKeyboardFallback)
|
||||||
{
|
{
|
||||||
@@ -598,7 +598,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
{
|
{
|
||||||
_isChangeTrackingActive = false; // Disable configuration change tracking
|
_isChangeTrackingActive = false; // Disable configuration change tracking
|
||||||
|
|
||||||
LoadDevices();
|
RefreshAvailableDevices();
|
||||||
|
|
||||||
IsModified = true;
|
IsModified = true;
|
||||||
RevertChanges();
|
RevertChanges();
|
||||||
@@ -700,7 +700,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
return str[(str.IndexOf(Hyphen) + Offset)..];
|
return str[(str.IndexOf(Hyphen) + Offset)..];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadDevices()
|
private void RefreshAvailableDevices()
|
||||||
{
|
{
|
||||||
int selectedDeviceIndex = 0;
|
int selectedDeviceIndex = 0;
|
||||||
(DeviceType Type, string Id, string Name) selectedDevice = default;
|
(DeviceType Type, string Id, string Name) selectedDevice = default;
|
||||||
|
|||||||
Reference in New Issue
Block a user