Preserve binary compatibility in SDL_SYSWM_TYPE (thanks Gerry JJ!)
authorGabriel Jacobo <gabomdq@gmail.com>
Tue, 28 Jan 2014 09:13:46 -0300
changeset 8134 7c9192be51a7
parent 8133 f24acf2403c0
child 8135 dd4729596096
Preserve binary compatibility in SDL_SYSWM_TYPE (thanks Gerry JJ!) Also moved Wayland structures to the bottom of the union for OCD related issues.
include/SDL_syswm.h
--- a/include/SDL_syswm.h	Tue Jan 28 00:05:23 2014 -0500
+++ b/include/SDL_syswm.h	Tue Jan 28 09:13:46 2014 -0300
@@ -101,10 +101,10 @@
     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;
 
 /**
@@ -176,14 +176,6 @@
             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
         {
@@ -204,6 +196,14 @@
             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;
     } info;