mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-11-19 17:21:15 +01:00
misc: chore: Use explicit types & fix object creation
This commit is contained in:
1 parent
9d3fecf334
commit
76a123b81d
454 files changed
+3042
-2961
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user