Skip to content

Commit

Permalink
Added an internal hint "SDL_VIDEO_X11_XINPUT2" for sdl2-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 11, 2025
1 parent ce69e98 commit 715c187
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/video/x11/SDL_x11xinput2.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ bool X11_InitXinput2(SDL_VideoDevice *_this)
unsigned char mask[4] = { 0, 0, 0, 0 };
int event, err;

/* XInput2 is required for relative mouse mode, so you probably want to leave this enabled */
if (!SDL_GetHintBoolean("SDL_VIDEO_X11_XINPUT2", true)) {
return false;
}

/*
* Initialize XInput 2
* According to http://who-t.blogspot.com/2009/05/xi2-recipes-part-1.html its better
Expand Down

0 comments on commit 715c187

Please sign in to comment.