Fixed another gcc <-> Visual C++ ABI issue

This commit is contained in:
Sam Lantinga 2012-10-20 00:49:08 -07:00
parent 423c05313b
commit df0e5d1844

View file

@ -438,6 +438,15 @@ typedef union SDL_Event
SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data */
SDL_DollarGestureEvent dgesture; /**< Multi Finger Gesture data */
SDL_DropEvent drop; /**< Drag and drop event data */
/* This is necessary for ABI compatibility between Visual C++ and GCC
Visual C++ will respect the push pack pragma and use 52 bytes for
this structure, and GCC will use the alignment of the largest datatype
within the union, which is 8 bytes.
So... we'll add padding to force the size to be 56 bytes for both.
*/
Uint8 padding[56];
} SDL_Event;