misc: chore: Use explicit types in HLE project
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common;
|
||||
using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.UI.Input
|
||||
{
|
||||
@@ -29,7 +31,7 @@ namespace Ryujinx.HLE.UI.Input
|
||||
{
|
||||
NpadButton buttons = 0;
|
||||
|
||||
foreach (var state in _lastStates)
|
||||
foreach (NpadCommonState state in _lastStates)
|
||||
{
|
||||
buttons |= state.Buttons;
|
||||
}
|
||||
@@ -60,7 +62,7 @@ namespace Ryujinx.HLE.UI.Input
|
||||
|
||||
public void Update(bool supressEvents = false)
|
||||
{
|
||||
ref var npads = ref _device.Hid.SharedMemory.Npads;
|
||||
ref Array10<NpadState> npads = ref _device.Hid.SharedMemory.Npads;
|
||||
|
||||
// Process each input individually.
|
||||
for (int npadIndex = 0; npadIndex < npads.Length; npadIndex++)
|
||||
@@ -73,10 +75,10 @@ namespace Ryujinx.HLE.UI.Input
|
||||
{
|
||||
const int MaxEntries = 1024;
|
||||
|
||||
ref var npadState = ref _device.Hid.SharedMemory.Npads[npadIndex];
|
||||
ref var lastEntry = ref _lastStates[npadIndex];
|
||||
ref NpadState npadState = ref _device.Hid.SharedMemory.Npads[npadIndex];
|
||||
ref NpadCommonState lastEntry = ref _lastStates[npadIndex];
|
||||
|
||||
var fullKeyEntries = GetCommonStateLifo(ref npadState.InternalState).ReadEntries(MaxEntries);
|
||||
ReadOnlySpan<AtomicStorage<NpadCommonState>> fullKeyEntries = GetCommonStateLifo(ref npadState.InternalState).ReadEntries(MaxEntries);
|
||||
|
||||
int firstEntryNum;
|
||||
|
||||
@@ -94,7 +96,7 @@ namespace Ryujinx.HLE.UI.Input
|
||||
|
||||
for (; firstEntryNum >= 0; firstEntryNum--)
|
||||
{
|
||||
var entry = fullKeyEntries[firstEntryNum];
|
||||
AtomicStorage<NpadCommonState> entry = fullKeyEntries[firstEntryNum];
|
||||
|
||||
// The interval of valid entries should be contiguous.
|
||||
if (entry.SamplingNumber < lastEntry.SamplingNumber)
|
||||
|
||||
Reference in New Issue
Block a user