chore: [si skip] fix in-code typos

This commit is contained in:
GreemDev
2025-10-20 21:32:07 -05:00
parent 7d65611b96
commit ed67535227
2 changed files with 12 additions and 12 deletions

View File

@@ -83,23 +83,23 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public ReadOnlySpan<AtomicStorage<T>> ReadEntries(uint maxCount) 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; return ReadOnlySpan<AtomicStorage<T>>.Empty;
} }
ulong index = ReadCurrentIndex(); ulong index = ReadCurrentIndex();
AtomicStorage<T>[] result = new AtomicStorage<T>[countAvailaible]; AtomicStorage<T>[] result = new AtomicStorage<T>[countAvailable];
Span<AtomicStorage<T>> storageSpan = _storage.AsSpan(); 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 inputEntryIndex = (int)((index + MaxEntries + 1 - countAvailable + i) % MaxEntries);
int outputEntryIndex = (int)(countAvailaible - i - 1); int outputEntryIndex = (int)(countAvailable - i - 1);
ulong samplingNumber0 = storageSpan[inputEntryIndex].ReadSamplingNumberAtomic(); ulong samplingNumber0 = storageSpan[inputEntryIndex].ReadSamplingNumberAtomic();
result[outputEntryIndex] = storageSpan[inputEntryIndex]; 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)) 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(); index = ReadCurrentIndex();
i -= 1; i -= 1;

View File

@@ -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; int npadsCount = _device.Hid.SharedMemory.Npads.Length;
// Process each input individually. // Process each input individually.
for (int npadIndex = 0; npadIndex < npadsCount; npadIndex++) 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; const int MaxEntries = 1024;
@@ -103,7 +103,7 @@ namespace Ryujinx.HLE.UI.Input
break; break;
} }
if (!supressEvents) if (!suppressEvents)
{ {
ProcessNpadButtons(npadIndex, entry.Object.Buttons); ProcessNpadButtons(npadIndex, entry.Object.Buttons);
} }