[BACK]Return to patch-src_video_wayland_SDL__waylandevents.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / SDL2 / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / SDL2 / patches / patch-src_video_wayland_SDL__waylandevents.c (download)

Revision 1.1, Sun Aug 18 16:16:25 2019 UTC (9 months, 2 weeks ago) by nia
Branch: MAIN
CVS Tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3

SDL2: Add support for Wayland in options.mk.

While here, resolve some pkglint problems.

Builds on NetBSD with Wayland support...

$NetBSD: patch-src_video_wayland_SDL__waylandevents.c,v 1.1 2019/08/18 16:16:25 nia Exp $

Allow building with Wayland on operating systems without evdev.

--- src/video/wayland/SDL_waylandevents.c.orig	2019-07-25 04:32:36.000000000 +0000
+++ src/video/wayland/SDL_waylandevents.c
@@ -43,7 +43,15 @@
 #include "xdg-shell-client-protocol.h"
 #include "xdg-shell-unstable-v6-client-protocol.h"
 
+#ifdef __linux
 #include <linux/input.h>
+#else
+#define BTN_LEFT    (0)
+#define BTN_MIDDLE  (1)
+#define BTN_RIGHT   (2)
+#define BTN_SIDE    (3)
+#define BTN_EXTRA   (4)
+#endif
 #include <sys/select.h>
 #include <sys/mman.h>
 #include <poll.h>