Skip to content

Commit

Permalink
Preserve binary compatibility in SDL_SYSWM_TYPE (thanks Gerry JJ!)
Browse files Browse the repository at this point in the history
Also moved Wayland structures to the bottom of the union for OCD related issues.
  • Loading branch information
gabomdq committed Jan 28, 2014
1 parent 9d85cdb commit 682bc47
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions include/SDL_syswm.h
Expand Up @@ -101,10 +101,10 @@ typedef enum
SDL_SYSWM_UNKNOWN,
SDL_SYSWM_WINDOWS,
SDL_SYSWM_X11,
SDL_SYSWM_WAYLAND,
SDL_SYSWM_DIRECTFB,
SDL_SYSWM_COCOA,
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
} SDL_SYSWM_TYPE;

/**
Expand Down Expand Up @@ -176,14 +176,6 @@ struct SDL_SysWMinfo
Window window; /**< The X11 window */
} x11;
#endif
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
struct
{
struct wl_display *display; /**< Wayland display */
struct wl_surface *surface; /**< Wayland surface */
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl;
#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
struct
{
Expand All @@ -203,6 +195,14 @@ struct SDL_SysWMinfo
{
UIWindow *window; /* The UIKit window */
} uikit;
#endif
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
struct
{
struct wl_display *display; /**< Wayland display */
struct wl_surface *surface; /**< Wayland surface */
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl;
#endif
/* Can't have an empty union */
int dummy;
Expand Down

0 comments on commit 682bc47

Please sign in to comment.