Patched to compile if Wayland is disabled via SDL_config.h (thanks, Martin!).
authorRyan C. Gordon <icculus@icculus.org>
Mon, 20 Jan 2014 12:53:44 -0500
changeset 8116 f7c2f71251e5
parent 8115 fa3f46850b5e
child 8117 988502081380
Patched to compile if Wayland is disabled via SDL_config.h (thanks, Martin!). Fixes Bugzilla #2351.
src/video/wayland/SDL_waylandevents.c
src/video/wayland/SDL_waylandmouse.c
src/video/wayland/SDL_waylandvideo.c
src/video/wayland/SDL_waylandwindow.c
--- a/src/video/wayland/SDL_waylandevents.c	Sat Jan 18 11:47:03 2014 -0800
+++ b/src/video/wayland/SDL_waylandevents.c	Mon Jan 20 12:53:44 2014 -0500
@@ -21,6 +21,8 @@
 
 #include "../../SDL_internal.h"
 
+#if SDL_VIDEO_DRIVER_WAYLAND
+
 #include "SDL_stdinc.h"
 #include "SDL_assert.h"
 
@@ -380,4 +382,6 @@
     d->input = NULL;
 }
 
+#endif /* SDL_VIDEO_DRIVER_WAYLAND */
+
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/wayland/SDL_waylandmouse.c	Sat Jan 18 11:47:03 2014 -0800
+++ b/src/video/wayland/SDL_waylandmouse.c	Mon Jan 20 12:53:44 2014 -0500
@@ -19,6 +19,10 @@
   3. This notice may not be removed or altered from any source distribution.
 */
 
+#include "../../SDL_internal.h"
+
+#if SDL_VIDEO_DRIVER_WAYLAND
+
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
@@ -31,7 +35,6 @@
 #include <stdlib.h>
 #include <limits.h>
 
-#include "../../SDL_internal.h"
 #include "../SDL_sysvideo.h"
 
 #include "SDL_mouse.h"
@@ -44,7 +47,6 @@
 
 #include "SDL_assert.h"
 
-#if SDL_VIDEO_DRIVER_WAYLAND
 
 typedef struct {
     struct wl_buffer   *buffer;
@@ -407,4 +409,4 @@
     mouse->WarpMouse = NULL;
     mouse->SetRelativeMouseMode = NULL;
 }
-#endif
+#endif  /* SDL_VIDEO_DRIVER_WAYLAND */
--- a/src/video/wayland/SDL_waylandvideo.c	Sat Jan 18 11:47:03 2014 -0800
+++ b/src/video/wayland/SDL_waylandvideo.c	Mon Jan 20 12:53:44 2014 -0500
@@ -21,6 +21,8 @@
 
 #include "../../SDL_internal.h"
 
+#if SDL_VIDEO_DRIVER_WAYLAND
+
 #include "SDL_video.h"
 #include "SDL_mouse.h"
 #include "SDL_stdinc.h"
@@ -429,4 +431,6 @@
     _this->driverdata = NULL;
 }
 
+#endif /* SDL_VIDEO_DRIVER_WAYLAND */
+
 /* vi: set ts=4 sw=4 expandtab: */
--- a/src/video/wayland/SDL_waylandwindow.c	Sat Jan 18 11:47:03 2014 -0800
+++ b/src/video/wayland/SDL_waylandwindow.c	Mon Jan 20 12:53:44 2014 -0500
@@ -21,6 +21,8 @@
 
 #include "../../SDL_internal.h"
 
+#if SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL
+
 #include "../SDL_sysvideo.h"
 #include "../../events/SDL_windowevents_c.h"
 #include "../SDL_egl_c.h"
@@ -236,4 +238,6 @@
     }
 }
 
+#endif /* SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL */
+
 /* vi: set ts=4 sw=4 expandtab: */