mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
XINPUT2 support check
reable check for x11 and check if XINPUT2 support before enable mouse grab mode TODO: need to restore non-mousegrab code?
This commit is contained in:
parent
57c1fd602c
commit
a3f387200e
1 changed files with 4 additions and 3 deletions
|
@ -1983,13 +1983,14 @@ void I_StartupGraphics(void)
|
|||
}
|
||||
if (M_CheckParm("-nomousegrab"))
|
||||
mousegrabok = SDL_FALSE;
|
||||
#if 0 // defined (_DEBUG)
|
||||
#if 1 // defined (_DEBUG)
|
||||
else
|
||||
{
|
||||
char videodriver[4] = {'S','D','L',0};
|
||||
if (!M_CheckParm("-mousegrab") &&
|
||||
SDL_VideoDriverName(videodriver,4) &&
|
||||
strncasecmp("X11",videodriver,4) == 0)
|
||||
*strncpy(videodriver, SDL_GetCurrentVideoDriver(), 4) != '\0' &&
|
||||
strncasecmp("x11",videodriver,4) == 0 &&
|
||||
SDL_SetRelativeMouseMode(1) == -1)
|
||||
mousegrabok = SDL_FALSE; //X11's XGrabPointer not good
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue