Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed another gcc <-> Visual C++ ABI issue
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 20, 2012
1 parent cac9f76 commit d81ff12
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/SDL_events.h
Expand Up @@ -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;


Expand Down

0 comments on commit d81ff12

Please sign in to comment.