From 30972d7e7fce4430bdc911926811d968eec7af57 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 17 Aug 2024 11:23:32 +0300 Subject: [PATCH] SDL_x11mouse.c: avoid -Wunused-variable if xinput2 is not available --- src/video/x11/SDL_x11mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index f7cdb80300b7b..5048cd01bbbe2 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -320,7 +320,9 @@ static void WarpMouseInternal(Window xwindow, const int x, const int y) { SDL_VideoData *videodata = (SDL_VideoData *)SDL_GetVideoDevice()->driverdata; Display *display = videodata->display; +#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2 int deviceid = 0; +#endif SDL_bool warp_hack = SDL_FALSE; /* XWayland will only warp the cursor if it is hidden, so this workaround is required. */ @@ -492,5 +494,3 @@ void X11_QuitMouse(_THIS) } #endif /* SDL_VIDEO_DRIVER_X11 */ - -/* vi: set ts=4 sw=4 expandtab: */