From 1d4bc3d2005c822d0cf83f356601c16b38f71dd5 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Wed, 26 May 2010 17:05:37 +0000 Subject: [PATCH] Added StructLayout(LayoutKind.Sequential) to the struct contained in SFML.Event, in SFML.Net git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1523 4e206d99-4929-0410-ac5d-dfc041789085 --- dotnet/src/Window/Event.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dotnet/src/Window/Event.cs b/dotnet/src/Window/Event.cs index 08374c40..06ec8356 100644 --- a/dotnet/src/Window/Event.cs +++ b/dotnet/src/Window/Event.cs @@ -228,6 +228,7 @@ namespace SFML /// Keyboard event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct KeyEvent { /// Code of the key (see KeyCode enum) @@ -248,6 +249,7 @@ namespace SFML /// Text event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct TextEvent { /// UTF-32 value of the character @@ -259,6 +261,7 @@ namespace SFML /// Mouse move event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct MouseMoveEvent { /// X coordinate of the mouse cursor @@ -273,6 +276,7 @@ namespace SFML /// Mouse buttons event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct MouseButtonEvent { /// Code of the button (see MouseButton enum) @@ -290,6 +294,7 @@ namespace SFML /// Mouse wheel event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct MouseWheelEvent { /// Scroll amount @@ -307,6 +312,7 @@ namespace SFML /// Joystick axis move event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct JoyMoveEvent { /// Index of the joystick which triggered the event @@ -324,6 +330,7 @@ namespace SFML /// Joystick buttons event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct JoyButtonEvent { /// Index of the joystick which triggered the event @@ -338,6 +345,7 @@ namespace SFML /// Size event parameters /// //////////////////////////////////////////////////////////// + [StructLayout(LayoutKind.Sequential)] public struct SizeEvent { /// New width of the window