Skip to content

Commit 62af66f

Browse files
committed
x11: More XInput2 #define cleanups
Fixes building on very old XInput2 versions (pre-2012) without smooth scrolling and multitouch.
1 parent b9c227e commit 62af66f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/video/x11/SDL_x11xinput2.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434

3535
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
3636
static bool xinput2_initialized;
37+
static bool xinput2_grabbed_touch_raised;
38+
static int xinput2_active_touch_count;
3739
#if defined(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO) || defined(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH)
3840
static bool xinput2_scrolling_supported;
3941
static bool xinput2_multitouch_supported;
40-
static bool xinput2_grabbed_touch_raised;
41-
static int xinput2_active_touch_count;
4242
#endif
4343
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE
4444
static bool xinput2_gesture_supported;
@@ -951,6 +951,7 @@ static bool HasDeviceID(Uint32 deviceID, const Uint32 *list, int count)
951951
return false;
952952
}
953953

954+
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
954955
static void AddDeviceID64(Uint64 deviceID, Uint64 **list, int *count)
955956
{
956957
int new_count = (*count + 1);
@@ -964,6 +965,7 @@ static void AddDeviceID64(Uint64 deviceID, Uint64 **list, int *count)
964965
*count = new_count;
965966
*list = new_list;
966967
}
968+
#endif
967969

968970
static bool HasDeviceID64(Uint64 deviceID, const Uint64 *list, int count)
969971
{

0 commit comments

Comments
 (0)