Fixed another gcc <-> Visual C++ ABI issue
authorSam Lantinga <slouken@libsdl.org>
Sat, 20 Oct 2012 00:49:08 -0700
changeset 6595c6402c811a40
parent 6594 dccafb0699dc
child 6596 b00cf2e4835c
Fixed another gcc <-> Visual C++ ABI issue
include/SDL_events.h
     1.1 --- a/include/SDL_events.h	Sat Oct 20 00:14:58 2012 -0700
     1.2 +++ b/include/SDL_events.h	Sat Oct 20 00:49:08 2012 -0700
     1.3 @@ -438,6 +438,15 @@
     1.4      SDL_MultiGestureEvent mgesture; /**< Multi Finger Gesture data */
     1.5      SDL_DollarGestureEvent dgesture; /**< Multi Finger Gesture data */
     1.6      SDL_DropEvent drop;             /**< Drag and drop event data */
     1.7 +
     1.8 +    /* This is necessary for ABI compatibility between Visual C++ and GCC
     1.9 +       Visual C++ will respect the push pack pragma and use 52 bytes for
    1.10 +       this structure, and GCC will use the alignment of the largest datatype
    1.11 +       within the union, which is 8 bytes.
    1.12 +
    1.13 +       So... we'll add padding to force the size to be 56 bytes for both.
    1.14 +    */
    1.15 +    Uint8 padding[56];
    1.16  } SDL_Event;
    1.17  
    1.18