Sh0inx line review Fixes

This commit is contained in:
Babib3l
2026-03-24 12:45:25 +01:00
parent ce07a2be68
commit 943d69e93d
2 changed files with 6 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.Configuration.Hid.Keyboard;
using Ryujinx.Common.Logging;
using System;
using System.Collections.Generic;
using System.Numerics;
@@ -323,7 +324,7 @@ namespace Ryujinx.Input.SDL3
public void SetLed(uint packedRgb)
{
// Keyboard LEDs are not supported by this backend.
Logger.Debug?.Print(LogClass.UI, "SetLed called on an SDL3Keyboard");
}
public void SetTriggerThreshold(float triggerThreshold)

View File

@@ -1,5 +1,6 @@
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.Configuration.Hid.Keyboard;
using Ryujinx.Common.Logging;
using Ryujinx.Input;
using System;
using System.Collections.Generic;
@@ -52,16 +53,12 @@ namespace Ryujinx.Ava.Input
foreach (KeyboardInputMappingHelper.KeyboardButtonMapping entry in _buttonsUserMapping)
{
if (!entry.IsValid)
if (!entry.IsValid || result.IsPressed(entry.To))
{
continue;
}
// NOTE: Do not touch state of the button already pressed.
if (!result.IsPressed(entry.To))
{
result.SetPressed(entry.To, rawState.IsPressed(entry.From));
}
result.SetPressed(entry.To, rawState.IsPressed(entry.From));
}
(short leftStickX, short leftStickY) = KeyboardInputMappingHelper.GetStickValues(ref rawState, _configuration.LeftJoyconStick);
@@ -115,7 +112,7 @@ namespace Ryujinx.Ava.Input
public void SetLed(uint packedRgb)
{
// Keyboard LEDs are not supported by this backend.
Logger.Debug?.Print(LogClass.UI, "SetLed called on an AvaloniaKeyboard");
}
public void SetTriggerThreshold(float triggerThreshold) { }