From 738adc1448420f54da269ca56c8e3cbb50b80437 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 5 Feb 2025 14:22:42 +0000
Subject: [PATCH] SDL_config_unix.h: Assume that Linux has XInput2
Classic SDL2 defined macros for several X11 extensions, but the only one
for which I found a concrete example in codesearch.debian.net is this one,
which the glvis package relies on.
I don't know whether other Unix platforms can be relied on to have this,
but it seems like a safe assumption on Linux.
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
include/SDL2/SDL_config_unix.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/SDL2/SDL_config_unix.h b/include/SDL2/SDL_config_unix.h
index 5a2cd9b..cbca3aa 100644
--- a/include/SDL2/SDL_config_unix.h
+++ b/include/SDL2/SDL_config_unix.h
@@ -222,6 +222,11 @@
#define SDL_TIMER_UNIX 1
#define SDL_VIDEO_DRIVER_X11 1
+#if defined(__LINUX__)
+/* glvis wants this */
+#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
+#endif
+
#if defined(__LINUX__)
/* Assume SDL on Linux most likely enables these */
#define HAVE_LIBDECOR_H 1