sdl2-compat: Force X11 on X4: Foundations

From f7508e663a0991a491d12a45ab92b327fe105073 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Fri, 5 Dec 2025 18:53:18 -0500
Subject: [PATCH] Force X11 on X4: Foundations

It assumes X11 and exits with an error otherwise.
---
 src/sdl2_compat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 001d860..f3f6247 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -532,6 +532,10 @@ static QuirkEntryType quirks[] = {
 
     /* SimCity 3000 tries to call SDL_DestroyMutex after we have been unloaded */
     {"sc3u.dynamic", "SDL2COMPAT_NO_UNLOAD", "1"},
+
+    /* X4: Foundations assumes X11 and exits with an error otherwise
+     * https://github.com/libsdl-org/sdl2-compat/issues/555 */
+    {"X4", SDL_HINT_VIDEO_DRIVER, "x11"},
 #endif
 };