remove Marshal call from KeyboardButton.CheckPressed

pull/53/head
Evan Hemsley 2023-12-28 18:54:21 -08:00
parent 4dbd5a2cbe
commit eaa9266521
1 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,3 @@
using System.Runtime.InteropServices;
namespace MoonWorks.Input namespace MoonWorks.Input
{ {
/// <summary> /// <summary>
@ -16,9 +14,9 @@ namespace MoonWorks.Input
KeyCode = keyCode; 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]);
} }
} }
} }