Commit c68976360d241fb82eda909e610a69b93c90d5d1

Anonymous Maarten 2023-02-18T04:48:24

Fix -Wunused-function warning when configuring with -DSDL_X11_XINPUT2=OFF

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/video/x11/SDL_x11xinput2.c b/src/video/x11/SDL_x11xinput2.c
index c20e7f6..4fe205b 100644
--- a/src/video/x11/SDL_x11xinput2.c
+++ b/src/video/x11/SDL_x11xinput2.c
@@ -181,6 +181,7 @@ void X11_InitXinput2(_THIS)
 #endif
 }
 
+#if SDL_VIDEO_DRIVER_X11_XINPUT2
 /* xi2 device went away? take it out of the list. */
 static void xinput2_remove_device_info(SDL_VideoData *videodata, const int device_id)
 {
@@ -202,7 +203,6 @@ static void xinput2_remove_device_info(SDL_VideoData *videodata, const int devic
     }
 }
 
-#if SDL_VIDEO_DRIVER_X11_XINPUT2
 static SDL_XInput2DeviceInfo *xinput2_get_device_info(SDL_VideoData *videodata, const int device_id)
 {
     /* cache device info as we see new devices. */