diff --git a/src/Input/VirtualButtons/KeyboardButton.cs b/src/Input/VirtualButtons/KeyboardButton.cs index e9a1d158..85df8738 100644 --- a/src/Input/VirtualButtons/KeyboardButton.cs +++ b/src/Input/VirtualButtons/KeyboardButton.cs @@ -1,5 +1,3 @@ -using System.Runtime.InteropServices; - namespace MoonWorks.Input { /// @@ -16,9 +14,9 @@ namespace MoonWorks.Input KeyCode = keyCode; } - internal override bool CheckPressed() + internal unsafe override bool CheckPressed() { - return Conversions.ByteToBool(Marshal.ReadByte(Parent.State, (int) KeyCode)); + return Conversions.ByteToBool(((byte*) Parent.State)[(int) KeyCode]); } } }