using System.Runtime.CompilerServices;
namespace Ryujinx.Input
{
///
/// A snapshot of a .
///
public class KeyboardStateSnapshot
{
private bool[] _keysState;
///
/// Create a new .
///
/// The keys state
public KeyboardStateSnapshot(bool[] keysState)
{
_keysState = keysState;
}
///
/// Check if a given key is pressed.
///
/// The key
/// True if the given key is pressed
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool IsPressed(Key key) => _keysState[(int)key];
}
}