SDL: Fix -Wunused-variable warning in src/video/x11/SDL_x11events.c

From cf267e49855c435743b25d649ea2dcbefe0d30db Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 21 Jun 2024 17:38:38 +0200
Subject: [PATCH] Fix -Wunused-variable warning in
 src/video/x11/SDL_x11events.c

---
 src/video/x11/SDL_x11events.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c
index 7530c309221b8..5f7bf97c35bd7 100644
--- a/src/video/x11/SDL_x11events.c
+++ b/src/video/x11/SDL_x11events.c
@@ -884,11 +884,13 @@ void X11_HandleKeyEvent(SDL_VideoDevice *_this, SDL_WindowData *windowdata, SDL_
     text[0] = '\0';
 
     if (SDL_TextInputActive()) {
+#if defined(HAVE_IBUS_IBUS_H) || defined(HAVE_FCITX)
         /* Save the original keycode for dead keys, which are filtered out by
            the XFilterEvent() call below.
         */
         int orig_event_type = xevent->type;
         KeyCode orig_keycode = xevent->xkey.keycode;
+#endif
 
         /* filter events catches XIM events and sends them to the correct handler */
         if (X11_XFilterEvent(xevent, None)) {