using System.Runtime.CompilerServices; namespace Ryujinx.Input { /// /// A snapshot of a . /// public class KeyboardStateSnapshot { public readonly 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]; } }