Skip to content

Commit 18195c5

Browse files
committed
x11: Add #ifdef guards to the XInput2 quit function
Fixes building if XInput2 isn't available.
1 parent 733335e commit 18195c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/video/x11/SDL_x11xinput2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ bool X11_InitXinput2(SDL_VideoDevice *_this)
342342

343343
void X11_QuitXinput2(SDL_VideoDevice *_this)
344344
{
345+
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
345346
SDL_free(xinput2_pointer_button_map);
346347
xinput2_pointer_button_map = NULL;
347348
xinput2_pointer_button_map_size = 0;
@@ -354,6 +355,7 @@ void X11_QuitXinput2(SDL_VideoDevice *_this)
354355
scrollable_devices = NULL;
355356
scrollable_device_count = 0;
356357
#endif
358+
#endif
357359
}
358360

359361
void X11_Xinput2UpdatePointerMapping(SDL_VideoDevice *_this)

0 commit comments

Comments
 (0)