From c04dca0dad2696d7dcd51427c8183b19ebff8a60 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 7 May 2018 19:26:02 -0700 Subject: [PATCH] Fixed bug 4159 - Windows headers are included after packing alignment change lectem The SDL_syswm.h header includes the windows.h header after including begin_code.h which changes the structure packing alignment. It seems this is not safe as suggested by the following warning : warning C4121: 'JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V2': alignment of a member was sensitive to packing --- include/SDL_syswm.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h index 8aa4a39ec..f1c4021cc 100644 --- a/include/SDL_syswm.h +++ b/include/SDL_syswm.h @@ -33,12 +33,6 @@ #include "SDL_video.h" #include "SDL_version.h" -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - /** * \file SDL_syswm.h * @@ -110,6 +104,12 @@ typedef void *EGLSurface; #include "SDL_egl.h" #endif +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +extern "C" { +#endif + /** * These are the various supported windowing subsystems */