aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/Ui/Input/NpadReader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE/Ui/Input/NpadReader.cs')
-rw-r--r--src/Ryujinx.HLE/Ui/Input/NpadReader.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Ryujinx.HLE/Ui/Input/NpadReader.cs b/src/Ryujinx.HLE/Ui/Input/NpadReader.cs
index a0d78d03..c4ef5da5 100644
--- a/src/Ryujinx.HLE/Ui/Input/NpadReader.cs
+++ b/src/Ryujinx.HLE/Ui/Input/NpadReader.cs
@@ -9,7 +9,7 @@ namespace Ryujinx.HLE.Ui.Input
class NpadReader
{
private readonly Switch _device;
- private NpadCommonState[] _lastStates;
+ private readonly NpadCommonState[] _lastStates;
public event NpadButtonHandler NpadButtonUpEvent;
public event NpadButtonHandler NpadButtonDownEvent;
@@ -37,7 +37,7 @@ namespace Ryujinx.HLE.Ui.Input
return buttons;
}
- private ref RingLifo<NpadCommonState> GetCommonStateLifo(ref NpadInternalState npad)
+ private static ref RingLifo<NpadCommonState> GetCommonStateLifo(ref NpadInternalState npad)
{
switch (npad.StyleSet)
{
@@ -58,7 +58,7 @@ namespace Ryujinx.HLE.Ui.Input
}
}
- public void Update(bool supressEvents=false)
+ public void Update(bool supressEvents = false)
{
ref var npads = ref _device.Hid.SharedMemory.Npads;
@@ -81,7 +81,11 @@ namespace Ryujinx.HLE.Ui.Input
int firstEntryNum;
// Scan the LIFO for the first entry that is newer that what's already processed.
- for (firstEntryNum = fullKeyEntries.Length - 1; firstEntryNum >= 0 && fullKeyEntries[firstEntryNum].Object.SamplingNumber <= lastEntry.SamplingNumber; firstEntryNum--) ;
+ for (firstEntryNum = fullKeyEntries.Length - 1;
+ firstEntryNum >= 0 && fullKeyEntries[firstEntryNum].Object.SamplingNumber <= lastEntry.SamplingNumber;
+ firstEntryNum--)
+ {
+ }
if (firstEntryNum == -1)
{