Merge branch 'master' into xeyes

This commit is contained in:
Evan Husted
2025-01-25 21:56:40 -06:00
committed by GitHub
488 changed files with 3469 additions and 3347 deletions

View File

@@ -229,7 +229,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
return;
}
var selected = Devices[_device].Type;
DeviceType selected = Devices[_device].Type;
if (selected != DeviceType.None)
{
@@ -314,7 +314,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
else
{
var type = DeviceType.None;
DeviceType type = DeviceType.None;
if (Config is StandardKeyboardInputConfig)
{
@@ -326,7 +326,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
type = DeviceType.Controller;
}
var item = Devices.FirstOrDefault(x => x.Type == type && x.Id == Config.Id);
(DeviceType Type, string Id, string Name) item = Devices.FirstOrDefault(x => x.Type == type && x.Id == Config.Id);
if (item != default)
{
Device = Devices.ToList().FindIndex(x => x.Id == item.Id);
@@ -346,7 +346,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
string id = GetCurrentGamepadId();
var type = Devices[Device].Type;
DeviceType type = Devices[Device].Type;
if (type == DeviceType.None)
{
@@ -388,7 +388,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
return string.Empty;
}
var device = Devices[Device];
(DeviceType Type, string Id, string Name) device = Devices[Device];
if (device.Type == DeviceType.None)
{
@@ -500,7 +500,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
private string GetProfileBasePath()
{
string path = AppDataManager.ProfilesDirPath;
var type = Devices[Device == -1 ? 0 : Device].Type;
DeviceType type = Devices[Device == -1 ? 0 : Device].Type;
if (type == DeviceType.Keyboard)
{
@@ -540,7 +540,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
public InputConfig LoadDefaultConfiguration()
{
var activeDevice = Devices.FirstOrDefault();
(DeviceType Type, string Id, string Name) activeDevice = Devices.FirstOrDefault();
if (Devices.Count > 0 && Device < Devices.Count && Device >= 0)
{
@@ -837,20 +837,20 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
else
{
var device = Devices[Device];
(DeviceType Type, string Id, string Name) device = Devices[Device];
if (device.Type == DeviceType.Keyboard)
{
var inputConfig = (ConfigViewModel as KeyboardInputViewModel).Config;
KeyboardInputConfig inputConfig = (ConfigViewModel as KeyboardInputViewModel).Config;
inputConfig.Id = device.Id;
}
else
{
var inputConfig = (ConfigViewModel as ControllerInputViewModel).Config;
GamepadInputConfig inputConfig = (ConfigViewModel as ControllerInputViewModel).Config;
inputConfig.Id = device.Id.Split(" ")[0];
}
var config = !IsController
InputConfig config = !IsController
? (ConfigViewModel as KeyboardInputViewModel).Config.GetConfig()
: (ConfigViewModel as ControllerInputViewModel).Config.GetConfig();
config.ControllerType = Controllers[_controller].Type;