mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +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"))
|
if (M_CheckParm("-nomousegrab"))
|
||||||
mousegrabok = SDL_FALSE;
|
mousegrabok = SDL_FALSE;
|
||||||
#if 0 // defined (_DEBUG)
|
#if 1 // defined (_DEBUG)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char videodriver[4] = {'S','D','L',0};
|
char videodriver[4] = {'S','D','L',0};
|
||||||
if (!M_CheckParm("-mousegrab") &&
|
if (!M_CheckParm("-mousegrab") &&
|
||||||
SDL_VideoDriverName(videodriver,4) &&
|
*strncpy(videodriver, SDL_GetCurrentVideoDriver(), 4) != '\0' &&
|
||||||
strncasecmp("X11",videodriver,4) == 0)
|
strncasecmp("x11",videodriver,4) == 0 &&
|
||||||
|
SDL_SetRelativeMouseMode(1) == -1)
|
||||||
mousegrabok = SDL_FALSE; //X11's XGrabPointer not good
|
mousegrabok = SDL_FALSE; //X11's XGrabPointer not good
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue