Commit d257c63c authored by Sam Lantinga's avatar Sam Lantinga

You can't have an empty union in the structure...

parent 9d25ba27
...@@ -125,28 +125,27 @@ struct SDL_SysWMmsg ...@@ -125,28 +125,27 @@ struct SDL_SysWMmsg
WPARAM wParam; /**< WORD message parameter */ WPARAM wParam; /**< WORD message parameter */
LPARAM lParam; /**< LONG message parameter */ LPARAM lParam; /**< LONG message parameter */
} win; } win;
#endif #elif defined(SDL_VIDEO_DRIVER_X11)
#if defined(SDL_VIDEO_DRIVER_X11)
struct { struct {
XEvent event; XEvent event;
} x11; } x11;
#endif #elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
struct { struct {
DFBEvent event; DFBEvent event;
} dfb; } dfb;
#endif #elif defined(SDL_VIDEO_DRIVER_COCOA)
#if defined(SDL_VIDEO_DRIVER_COCOA)
struct struct
{ {
/* No Cocoa window events yet */ /* No Cocoa window events yet */
} cocoa; } cocoa;
#endif #elif defined(SDL_VIDEO_DRIVER_UIKIT)
#if defined(SDL_VIDEO_DRIVER_UIKIT)
struct struct
{ {
/* No UIKit window events yet */ /* No UIKit window events yet */
} uikit; } uikit;
else
/* Can't have an empty union */
int dummy;
#endif #endif
} msg; } msg;
}; };
...@@ -168,33 +167,32 @@ struct SDL_SysWMinfo ...@@ -168,33 +167,32 @@ struct SDL_SysWMinfo
{ {
HWND window; /**< The window handle */ HWND window; /**< The window handle */
} win; } win;
#endif #elif defined(SDL_VIDEO_DRIVER_X11)
#if defined(SDL_VIDEO_DRIVER_X11)
struct struct
{ {
Display *display; /**< The X11 display */ Display *display; /**< The X11 display */
Window window; /**< The X11 window */ Window window; /**< The X11 window */
} x11; } x11;
#endif #elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
struct struct
{ {
IDirectFB *dfb; /**< The directfb main interface */ IDirectFB *dfb; /**< The directfb main interface */
IDirectFBWindow *window; /**< The directfb window handle */ IDirectFBWindow *window; /**< The directfb window handle */
IDirectFBSurface *surface; /**< The directfb client surface */ IDirectFBSurface *surface; /**< The directfb client surface */
} dfb; } dfb;
#endif #elif defined(SDL_VIDEO_DRIVER_COCOA)
#if defined(SDL_VIDEO_DRIVER_COCOA)
struct struct
{ {
NSWindow *window; /* The Cocoa window */ NSWindow *window; /* The Cocoa window */
} cocoa; } cocoa;
#endif #elif defined(SDL_VIDEO_DRIVER_UIKIT)
#if defined(SDL_VIDEO_DRIVER_UIKIT)
struct struct
{ {
UIWindow *window; /* The UIKit window */ UIWindow *window; /* The UIKit window */
} uikit; } uikit;
#else
/* Can't have an empty union */
int dummy;
#endif #endif
} info; } info;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment