mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-10-25 07:34:25 +00:00
chore: [si skip] fix in-code typos
This commit is contained in:
@@ -83,23 +83,23 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public ReadOnlySpan<AtomicStorage<T>> ReadEntries(uint maxCount)
|
||||
{
|
||||
ulong countAvailaible = Math.Min(Math.Max(0, ReadCurrentCount()), maxCount);
|
||||
ulong countAvailable = Math.Min(Math.Max(0, ReadCurrentCount()), maxCount);
|
||||
|
||||
if (countAvailaible == 0)
|
||||
if (countAvailable == 0)
|
||||
{
|
||||
return ReadOnlySpan<AtomicStorage<T>>.Empty;
|
||||
}
|
||||
|
||||
ulong index = ReadCurrentIndex();
|
||||
|
||||
AtomicStorage<T>[] result = new AtomicStorage<T>[countAvailaible];
|
||||
AtomicStorage<T>[] result = new AtomicStorage<T>[countAvailable];
|
||||
|
||||
Span<AtomicStorage<T>> storageSpan = _storage.AsSpan();
|
||||
|
||||
for (ulong i = 0; i < countAvailaible; i++)
|
||||
for (ulong i = 0; i < countAvailable; i++)
|
||||
{
|
||||
int inputEntryIndex = (int)((index + MaxEntries + 1 - countAvailaible + i) % MaxEntries);
|
||||
int outputEntryIndex = (int)(countAvailaible - i - 1);
|
||||
int inputEntryIndex = (int)((index + MaxEntries + 1 - countAvailable + i) % MaxEntries);
|
||||
int outputEntryIndex = (int)(countAvailable - i - 1);
|
||||
|
||||
ulong samplingNumber0 = storageSpan[inputEntryIndex].ReadSamplingNumberAtomic();
|
||||
result[outputEntryIndex] = storageSpan[inputEntryIndex];
|
||||
@@ -107,9 +107,9 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common
|
||||
|
||||
if (samplingNumber0 != samplingNumber1 && (i > 0 && (result[outputEntryIndex].SamplingNumber - result[outputEntryIndex].SamplingNumber) != 1))
|
||||
{
|
||||
ulong tempCount = Math.Min(ReadCurrentCount(), countAvailaible);
|
||||
ulong tempCount = Math.Min(ReadCurrentCount(), countAvailable);
|
||||
|
||||
countAvailaible = Math.Min(tempCount, maxCount);
|
||||
countAvailable = Math.Min(tempCount, maxCount);
|
||||
index = ReadCurrentIndex();
|
||||
|
||||
i -= 1;
|
||||
|
||||
@@ -59,18 +59,18 @@ namespace Ryujinx.HLE.UI.Input
|
||||
}
|
||||
}
|
||||
|
||||
public void Update(bool supressEvents = false)
|
||||
public void Update(bool suppressEvents = false)
|
||||
{
|
||||
int npadsCount = _device.Hid.SharedMemory.Npads.Length;
|
||||
|
||||
// Process each input individually.
|
||||
for (int npadIndex = 0; npadIndex < npadsCount; npadIndex++)
|
||||
{
|
||||
UpdateNpad(npadIndex, supressEvents);
|
||||
UpdateNpad(npadIndex, suppressEvents);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateNpad(int npadIndex, bool supressEvents)
|
||||
private void UpdateNpad(int npadIndex, bool suppressEvents)
|
||||
{
|
||||
const int MaxEntries = 1024;
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Ryujinx.HLE.UI.Input
|
||||
break;
|
||||
}
|
||||
|
||||
if (!supressEvents)
|
||||
if (!suppressEvents)
|
||||
{
|
||||
ProcessNpadButtons(npadIndex, entry.Object.Buttons);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user