mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 21:55:47 +00:00
Memory Changes part 2 (ryubing/ryujinx!123)
See merge request ryubing/ryujinx!123
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Ryujinx.Common.Memory;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ryujinx.Input
|
||||
@@ -48,7 +49,7 @@ namespace Ryujinx.Input
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public (float, float) GetStick(StickInputId inputId)
|
||||
{
|
||||
Array2<float> result = _joysticksState[(int)inputId];
|
||||
Span<float> result = _joysticksState[(int)inputId].AsSpan();
|
||||
|
||||
return (result[0], result[1]);
|
||||
}
|
||||
@@ -62,8 +63,9 @@ namespace Ryujinx.Input
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SetStick(StickInputId inputId, float x, float y)
|
||||
{
|
||||
_joysticksState[(int)inputId][0] = x;
|
||||
_joysticksState[(int)inputId][1] = y;
|
||||
Span<float> stateSpan = _joysticksState[(int)inputId].AsSpan();
|
||||
stateSpan[0] = x;
|
||||
stateSpan[1] = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user