Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Patched to compile if Wayland is disabled via SDL_config.h (thanks, M…
…artin!).

Fixes Bugzilla #2351.
  • Loading branch information
icculus committed Jan 20, 2014
1 parent 9e90acd commit 2ddd0c5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/video/wayland/SDL_waylandevents.c
Expand Up @@ -21,6 +21,8 @@

#include "../../SDL_internal.h"

#if SDL_VIDEO_DRIVER_WAYLAND

#include "SDL_stdinc.h"
#include "SDL_assert.h"

Expand Down Expand Up @@ -380,4 +382,6 @@ void Wayland_display_destroy_input(SDL_VideoData *d)
d->input = NULL;
}

#endif /* SDL_VIDEO_DRIVER_WAYLAND */

/* vi: set ts=4 sw=4 expandtab: */
8 changes: 5 additions & 3 deletions src/video/wayland/SDL_waylandmouse.c
Expand Up @@ -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
Expand All @@ -31,7 +35,6 @@
#include <stdlib.h>
#include <limits.h>

#include "../../SDL_internal.h"
#include "../SDL_sysvideo.h"

#include "SDL_mouse.h"
Expand All @@ -44,7 +47,6 @@

#include "SDL_assert.h"

#if SDL_VIDEO_DRIVER_WAYLAND

typedef struct {
struct wl_buffer *buffer;
Expand Down Expand Up @@ -407,4 +409,4 @@ Wayland_FiniMouse(void)
mouse->WarpMouse = NULL;
mouse->SetRelativeMouseMode = NULL;
}
#endif
#endif /* SDL_VIDEO_DRIVER_WAYLAND */
4 changes: 4 additions & 0 deletions src/video/wayland/SDL_waylandvideo.c
Expand Up @@ -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"
Expand Down Expand Up @@ -429,4 +431,6 @@ Wayland_VideoQuit(_THIS)
_this->driverdata = NULL;
}

#endif /* SDL_VIDEO_DRIVER_WAYLAND */

/* vi: set ts=4 sw=4 expandtab: */
4 changes: 4 additions & 0 deletions src/video/wayland/SDL_waylandwindow.c
Expand Up @@ -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"
Expand Down Expand Up @@ -236,4 +238,6 @@ void Wayland_DestroyWindow(_THIS, SDL_Window *window)
}
}

#endif /* SDL_VIDEO_DRIVER_WAYLAND && SDL_VIDEO_OPENGL_EGL */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 2ddd0c5

Please sign in to comment.