From a60751b7a734f94ba82b2e44c29d2c4e487cdbab Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 6 Nov 2018 20:50:24 +0300 Subject: [PATCH] fix bug #4362 - SDL_syswm.h with SDL_PROTOTYPES_ONLY broken in C++ mode --- include/SDL_syswm.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h index 0748b922708db..e7d9baa9bf101 100644 --- a/include/SDL_syswm.h +++ b/include/SDL_syswm.h @@ -41,9 +41,9 @@ * an unhandled window event occurs. This event is ignored by default, but * you can enable it with SDL_EventState(). */ -#ifdef SDL_PROTOTYPES_ONLY struct SDL_SysWMinfo; -#else + +#if !defined(SDL_PROTOTYPES_ONLY) #if defined(SDL_VIDEO_DRIVER_WINDOWS) #ifndef WIN32_LEAN_AND_MEAN @@ -103,6 +103,8 @@ typedef void *EGLSurface; #if defined(SDL_VIDEO_DRIVER_VIVANTE) #include "SDL_egl.h" #endif +#endif /* SDL_PROTOTYPES_ONLY */ + #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ @@ -110,6 +112,7 @@ typedef void *EGLSurface; extern "C" { #endif +#if !defined(SDL_PROTOTYPES_ONLY) /** * These are the various supported windowing subsystems */