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:
Alam Ed Arias 2014-04-09 14:24:58 -04:00
parent 57c1fd602c
commit a3f387200e

View file

@ -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