mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-18 11:15:48 +00:00
@@ -46,21 +46,21 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
|
||||
[ObservableProperty] private GamepadInputId _buttonMinus;
|
||||
[ObservableProperty] private GamepadInputId _buttonPlus;
|
||||
|
||||
|
||||
[ObservableProperty] private GamepadInputId _buttonA;
|
||||
[ObservableProperty] private GamepadInputId _buttonB;
|
||||
[ObservableProperty] private GamepadInputId _buttonX;
|
||||
[ObservableProperty] private GamepadInputId _buttonY;
|
||||
|
||||
|
||||
[ObservableProperty] private GamepadInputId _buttonZl;
|
||||
[ObservableProperty] private GamepadInputId _buttonZr;
|
||||
|
||||
|
||||
[ObservableProperty] private GamepadInputId _buttonL;
|
||||
[ObservableProperty] private GamepadInputId _buttonR;
|
||||
|
||||
|
||||
[ObservableProperty] private GamepadInputId _leftButtonSl;
|
||||
[ObservableProperty] private GamepadInputId _leftButtonSr;
|
||||
|
||||
|
||||
[ObservableProperty] private GamepadInputId _rightButtonSl;
|
||||
[ObservableProperty] private GamepadInputId _rightButtonSr;
|
||||
|
||||
@@ -73,17 +73,17 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
[ObservableProperty] private float _triggerThreshold;
|
||||
|
||||
[ObservableProperty] private bool _enableMotion;
|
||||
|
||||
|
||||
[ObservableProperty] private bool _enableRumble;
|
||||
|
||||
|
||||
[ObservableProperty] private bool _enableLedChanging;
|
||||
|
||||
|
||||
[ObservableProperty] private Color _ledColor;
|
||||
|
||||
|
||||
public bool ShowLedColorPicker => !TurnOffLed && !UseRainbowLed;
|
||||
|
||||
|
||||
private bool _turnOffLed;
|
||||
|
||||
|
||||
public bool TurnOffLed
|
||||
{
|
||||
get => _turnOffLed;
|
||||
@@ -94,9 +94,9 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
OnPropertyChanged(nameof(ShowLedColorPicker));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool _useRainbowLed;
|
||||
|
||||
|
||||
public bool UseRainbowLed
|
||||
{
|
||||
get => _useRainbowLed;
|
||||
@@ -183,7 +183,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
WeakRumble = controllerInput.Rumble.WeakRumble;
|
||||
StrongRumble = controllerInput.Rumble.StrongRumble;
|
||||
}
|
||||
|
||||
|
||||
if (controllerInput.Led != null)
|
||||
{
|
||||
EnableLedChanging = controllerInput.Led.EnableLed;
|
||||
@@ -204,7 +204,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
StandardControllerInputConfig config = new()
|
||||
{
|
||||
Id = Id,
|
||||
Name = Name,
|
||||
Name = Name,
|
||||
Backend = InputBackendType.GamepadSDL2,
|
||||
PlayerIndex = PlayerIndex,
|
||||
ControllerType = ControllerType,
|
||||
|
||||
@@ -29,24 +29,24 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
[ObservableProperty] private Key _dpadDown;
|
||||
[ObservableProperty] private Key _dpadLeft;
|
||||
[ObservableProperty] private Key _dpadRight;
|
||||
|
||||
|
||||
[ObservableProperty] private Key _buttonMinus;
|
||||
[ObservableProperty] private Key _buttonPlus;
|
||||
|
||||
|
||||
[ObservableProperty] private Key _buttonA;
|
||||
[ObservableProperty] private Key _buttonB;
|
||||
[ObservableProperty] private Key _buttonX;
|
||||
[ObservableProperty] private Key _buttonY;
|
||||
|
||||
|
||||
[ObservableProperty] private Key _buttonL;
|
||||
[ObservableProperty] private Key _buttonR;
|
||||
|
||||
|
||||
[ObservableProperty] private Key _buttonZl;
|
||||
[ObservableProperty] private Key _buttonZr;
|
||||
|
||||
|
||||
[ObservableProperty] private Key _leftButtonSl;
|
||||
[ObservableProperty] private Key _leftButtonSr;
|
||||
|
||||
|
||||
[ObservableProperty] private Key _rightButtonSl;
|
||||
[ObservableProperty] private Key _rightButtonSr;
|
||||
|
||||
|
||||
@@ -96,9 +96,9 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
public float UiStickRightX => ClampVector(UiStickRight).Item1;
|
||||
public float UiStickRightY => ClampVector(UiStickRight).Item2;
|
||||
|
||||
public int UiStickCircumference => DrawStickCircumference;
|
||||
public int UiCanvasSize => DrawStickCanvasSize;
|
||||
public int UiStickBorderSize => DrawStickBorderSize;
|
||||
public static int UiStickCircumference => DrawStickCircumference;
|
||||
public static int UiCanvasSize => DrawStickCanvasSize;
|
||||
public static int UiStickBorderSize => DrawStickBorderSize;
|
||||
|
||||
public float? UiDeadzoneLeft => _gamepadConfig?.DeadzoneLeft * DrawStickCanvasSize - DrawStickCircumference;
|
||||
public float? UiDeadzoneRight => _gamepadConfig?.DeadzoneRight * DrawStickCanvasSize - DrawStickCircumference;
|
||||
@@ -158,14 +158,17 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
{
|
||||
leftBuffer.Item1 += 1;
|
||||
}
|
||||
|
||||
if (snapshot.IsPressed((Key)KeyboardConfig.LeftStickLeft))
|
||||
{
|
||||
leftBuffer.Item1 -= 1;
|
||||
}
|
||||
|
||||
if (snapshot.IsPressed((Key)KeyboardConfig.LeftStickUp))
|
||||
{
|
||||
leftBuffer.Item2 += 1;
|
||||
}
|
||||
|
||||
if (snapshot.IsPressed((Key)KeyboardConfig.LeftStickDown))
|
||||
{
|
||||
leftBuffer.Item2 -= 1;
|
||||
@@ -175,14 +178,17 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
{
|
||||
rightBuffer.Item1 += 1;
|
||||
}
|
||||
|
||||
if (snapshot.IsPressed((Key)KeyboardConfig.RightStickLeft))
|
||||
{
|
||||
rightBuffer.Item1 -= 1;
|
||||
}
|
||||
|
||||
if (snapshot.IsPressed((Key)KeyboardConfig.RightStickUp))
|
||||
{
|
||||
rightBuffer.Item2 += 1;
|
||||
}
|
||||
|
||||
if (snapshot.IsPressed((Key)KeyboardConfig.RightStickDown))
|
||||
{
|
||||
rightBuffer.Item2 -= 1;
|
||||
@@ -191,6 +197,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
UiStickLeft = leftBuffer;
|
||||
UiStickRight = rightBuffer;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DeviceType.Controller:
|
||||
@@ -201,6 +208,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
||||
leftBuffer = controller.GetStick((StickInputId)GamepadConfig.LeftJoystick);
|
||||
rightBuffer = controller.GetStick((StickInputId)GamepadConfig.RightJoystick);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DeviceType.None:
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Ryujinx.Ava.UI.Models
|
||||
public string Path { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public string FormattedName =>
|
||||
public string FormattedName =>
|
||||
InSd && ulong.TryParse(Name, NumberStyles.HexNumber, null, out ulong applicationId)
|
||||
? $"Atmosphère: {RyujinxApp.MainWindow.ApplicationLibrary.GetNameForApplicationId(applicationId)}"
|
||||
: Name;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Gommon;
|
||||
using LibHac.Fs;
|
||||
using LibHac.Ncm;
|
||||
using Ryujinx.Ava.Systems.AppLibrary;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Ava.Utilities;
|
||||
using Ryujinx.Ava.Systems.AppLibrary;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -23,10 +23,10 @@ namespace Ryujinx.Ava.UI.Models
|
||||
ShaderCount = shaderCount;
|
||||
}
|
||||
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is not StatusUpdatedEventArgs suea) return false;
|
||||
if (obj is not StatusUpdatedEventArgs suea)
|
||||
return false;
|
||||
return
|
||||
VSyncMode == suea.VSyncMode &&
|
||||
VolumeStatus == suea.VolumeStatus &&
|
||||
@@ -37,7 +37,7 @@ namespace Ryujinx.Ava.UI.Models
|
||||
ShaderCount == suea.ShaderCount;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
public override int GetHashCode()
|
||||
=> HashCode.Combine(VSyncMode, VolumeStatus, AspectRatio, DockedMode, FifoStatus, GameStatus, ShaderCount);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user