misc: chore: Use explicit types in input projects

This commit is contained in:
Evan Husted
2025-01-25 14:09:05 -06:00
parent 1712d69dcd
commit ac401034d7
8 changed files with 20 additions and 18 deletions

View File

@@ -48,7 +48,7 @@ namespace Ryujinx.Input.Motion.CemuHook
lock (_clients)
{
foreach (var client in _clients)
foreach (KeyValuePair<int, UdpClient> client in _clients)
{
try
{
@@ -209,7 +209,7 @@ namespace Ryujinx.Input.Motion.CemuHook
{
client.Client.ReceiveTimeout = timeout;
var result = client?.Receive(ref endPoint);
byte[] result = client?.Receive(ref endPoint);
if (result.Length > 0)
{
@@ -225,7 +225,7 @@ namespace Ryujinx.Input.Motion.CemuHook
private void SetRetryTimer(int clientId)
{
var elapsedMs = PerformanceCounter.ElapsedMilliseconds;
long elapsedMs = PerformanceCounter.ElapsedMilliseconds;
_clientRetryTimer[clientId] = elapsedMs;
}
@@ -338,9 +338,9 @@ namespace Ryujinx.Input.Motion.CemuHook
{
int slot = inputData.Shared.Slot;
if (_motionData.TryGetValue(clientId, out var motionDataItem))
if (_motionData.TryGetValue(clientId, out Dictionary<int, MotionInput> motionDataItem))
{
if (motionDataItem.TryGetValue(slot, out var previousData))
if (motionDataItem.TryGetValue(slot, out MotionInput previousData))
{
previousData.Update(accelerometer, gyroscrope, timestamp, cemuHookConfig.Sensitivity, (float)cemuHookConfig.GyroDeadzone);
}