mirror of
https://github.com/yawut/SDL.git
synced 2026-04-24 23:37:09 -05:00
WinRT: hack-fixed C++/CX compile errors regarding the 'generic' field in SDL_Event, which conflicts with a C++/CX keyword
This commit is contained in:
parent
49820874a9
commit
f9531484c0
|
|
@ -148,3 +148,8 @@
|
|||
#endif
|
||||
#endif /* NULL */
|
||||
#endif /* ! Mac OS X - breaks precompiled headers */
|
||||
|
||||
/* HACK: Make sure C++/CX works when compiling WinRT code */
|
||||
#if defined(__WINRT__)
|
||||
#define generic generic_
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,3 +35,8 @@
|
|||
#endif
|
||||
#pragma pack(pop)
|
||||
#endif /* Compiler needs structure packing set */
|
||||
|
||||
/* Revert hack used to get C++/CX (WinRT) code compiling. */
|
||||
#if defined(__WINRT__)
|
||||
#undef generic
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,6 +33,15 @@
|
|||
#endif
|
||||
#include "../video/SDL_sysvideo.h"
|
||||
|
||||
/* HACK: Make sure the 'generic' field in SDL_Event works on
|
||||
WinRT, whereby 'generic' is redefined as 'generic_', in order to
|
||||
allow SDL.h to be included in code compiled with Microsoft's
|
||||
C++/CX extension.
|
||||
*/
|
||||
#if defined(__WINRT__)
|
||||
#define generic generic_
|
||||
#endif
|
||||
|
||||
/* Public data -- the event filter */
|
||||
SDL_EventFilter SDL_EventOK = NULL;
|
||||
void *SDL_EventOKParam;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user