Add padding to SDL_Event

This commit is contained in:
Caleb Cornett 2020-06-12 22:37:18 -04:00 committed by Ethan Lee
parent f4d713f651
commit b253a810e0

View file

@ -4822,7 +4822,7 @@ namespace SDL2
/* General event structure */
// C# doesn't do unions, so we do this ugly thing. */
[StructLayout(LayoutKind.Explicit)]
public struct SDL_Event
public unsafe struct SDL_Event
{
[FieldOffset(0)]
public SDL_EventType type;
@ -4878,6 +4878,8 @@ namespace SDL2
public SDL_DollarGestureEvent dgesture;
[FieldOffset(0)]
public SDL_DropEvent drop;
[FieldOffset(0)]
private fixed byte padding[56];
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]