remove Marshal call from KeyboardButton.CheckPressed

remotes/1734711610904720328/main
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
{
/// <summary>
@ -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]);
}
}
}