From 2e411bc1ff02516a64e790627373255b863f76df Mon Sep 17 00:00:00 2001
From: Sylvain Becker <[EMAIL REDACTED]>
Date: Fri, 6 Jan 2023 15:30:47 +0100
Subject: [PATCH] Fix build DisableScreenSaver (#23)
---
src/sdl2_compat.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 1ebac22..910c2bc 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -25,6 +25,16 @@
#include "dynapi/SDL_dynapi.h"
+
+#if defined(DisableScreenSaver)
+/*
+This breaks the build when creating SDL_ ## DisableScreenSaver
+/usr/include/X11/X.h:#define DisableScreenSaver 0
+*/
+#undef DisableScreenSaver
+#endif
+
+
#if SDL_DYNAMIC_API
#include "dynapi/SDL_dynapi_overrides.h"
/* force DECLSPEC off...it's all internal symbols now.