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 8116f7c2f71251e5
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
     1.1 --- a/src/video/wayland/SDL_waylandevents.c	Sat Jan 18 11:47:03 2014 -0800
     1.2 +++ b/src/video/wayland/SDL_waylandevents.c	Mon Jan 20 12:53:44 2014 -0500
     1.3 @@ -21,6 +21,8 @@
     1.4  
     1.5  #include "../../SDL_internal.h"
     1.6  
     1.7 +#if SDL_VIDEO_DRIVER_WAYLAND
     1.8 +
     1.9  #include "SDL_stdinc.h"
    1.10  #include "SDL_assert.h"
    1.11  
    1.12 @@ -380,4 +382,6 @@
    1.13      d->input = NULL;
    1.14  }
    1.15  
    1.16 +#endif /* SDL_VIDEO_DRIVER_WAYLAND */
    1.17 +
    1.18  /* vi: set ts=4 sw=4 expandtab: */
     2.1 --- a/src/video/wayland/SDL_waylandmouse.c	Sat Jan 18 11:47:03 2014 -0800
     2.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Mon Jan 20 12:53:44 2014 -0500
     2.3 @@ -19,6 +19,10 @@
     2.4    3. This notice may not be removed or altered from any source distribution.
     2.5  */
     2.6  
     2.7 +#include "../../SDL_internal.h"
     2.8 +
     2.9 +#if SDL_VIDEO_DRIVER_WAYLAND
    2.10 +
    2.11  #ifndef _GNU_SOURCE
    2.12  #define _GNU_SOURCE
    2.13  #endif
    2.14 @@ -31,7 +35,6 @@
    2.15  #include <stdlib.h>
    2.16  #include <limits.h>
    2.17  
    2.18 -#include "../../SDL_internal.h"
    2.19  #include "../SDL_sysvideo.h"
    2.20  
    2.21  #include "SDL_mouse.h"
    2.22 @@ -44,7 +47,6 @@
    2.23  
    2.24  #include "SDL_assert.h"
    2.25  
    2.26 -#if SDL_VIDEO_DRIVER_WAYLAND
    2.27  
    2.28  typedef struct {
    2.29      struct wl_buffer   *buffer;
    2.30 @@ -407,4 +409,4 @@
    2.31      mouse->WarpMouse = NULL;
    2.32      mouse->SetRelativeMouseMode = NULL;
    2.33  }
    2.34 -#endif
    2.35 +#endif  /* SDL_VIDEO_DRIVER_WAYLAND */
     3.1 --- a/src/video/wayland/SDL_waylandvideo.c	Sat Jan 18 11:47:03 2014 -0800
     3.2 +++ b/src/video/wayland/SDL_waylandvideo.c	Mon Jan 20 12:53:44 2014 -0500
     3.3 @@ -21,6 +21,8 @@
     3.4  
     3.5  #include "../../SDL_internal.h"
     3.6  
     3.7 +#if SDL_VIDEO_DRIVER_WAYLAND
     3.8 +
     3.9  #include "SDL_video.h"
    3.10  #include "SDL_mouse.h"
    3.11  #include "SDL_stdinc.h"
    3.12 @@ -429,4 +431,6 @@
    3.13      _this->driverdata = NULL;
    3.14  }
    3.15  
    3.16 +#endif /* SDL_VIDEO_DRIVER_WAYLAND */
    3.17 +
    3.18  /* vi: set ts=4 sw=4 expandtab: */
     4.1 --- a/src/video/wayland/SDL_waylandwindow.c	Sat Jan 18 11:47:03 2014 -0800
     4.2 +++ b/src/video/wayland/SDL_waylandwindow.c	Mon Jan 20 12:53:44 2014 -0500
     4.3 @@ -21,6 +21,8 @@
     4.4  
     4.5  #include "../../SDL_internal.h"
     4.6  
     4.7 +#if SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL
     4.8 +
     4.9  #include "../SDL_sysvideo.h"
    4.10  #include "../../events/SDL_windowevents_c.h"
    4.11  #include "../SDL_egl_c.h"
    4.12 @@ -236,4 +238,6 @@
    4.13      }
    4.14  }
    4.15  
    4.16 +#endif /* SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL */
    4.17 +
    4.18  /* vi: set ts=4 sw=4 expandtab: */