From d81ff123ce2cee0d9f0917b41b4345b75addfefb Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 20 Oct 2012 00:49:08 -0700 Subject: [PATCH] Fixed another gcc <-> Visual C++ ABI issue --- include/SDL_events.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/SDL_events.h b/include/SDL_events.h index 39648af4d..a6ccb80a9 100644 --- a/include/SDL_events.h +++ b/include/SDL_events.h @@ -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;