disable x11 check

This commit is contained in:
Alam Ed Arias 2014-04-09 19:55:05 -04:00
parent 2005421a7e
commit 8fea599bf8

View file

@ -857,7 +857,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
event.type = ev_mouse; event.type = ev_mouse;
D_PostEvent(&event); D_PostEvent(&event);
if (mousewarp){ if (mousewarp)
{
// Warp the pointer back to the middle of the window // Warp the pointer back to the middle of the window
// or we cannot move any further if it's at a border. // or we cannot move any further if it's at a border.
if ((evt.x < (wwidth/2 )-(wwidth/4 )) || if ((evt.x < (wwidth/2 )-(wwidth/4 )) ||
@ -867,7 +868,9 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
{ {
HalfWarpMouse(wwidth, wheight); HalfWarpMouse(wwidth, wheight);
} }
} else { }
else
{
SDL_SetWindowGrab(window, mousegrabok); SDL_SetWindowGrab(window, mousegrabok);
SDL_SetRelativeMouseMode(SDL_TRUE); SDL_SetRelativeMouseMode(SDL_TRUE);
} }
@ -1989,14 +1992,13 @@ void I_StartupGraphics(void)
mousegrabok = SDL_FALSE; mousegrabok = SDL_FALSE;
else if (M_CheckParm("-mousewarp") || SDL_SetRelativeMouseMode(SDL_TRUE) == -1) else if (M_CheckParm("-mousewarp") || SDL_SetRelativeMouseMode(SDL_TRUE) == -1)
mousewarp = SDL_TRUE; mousewarp = SDL_TRUE;
#if 1 // defined (_DEBUG) #if 0 // 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") &&
*strncpy(videodriver, SDL_GetCurrentVideoDriver(), 4) != '\0' && *strncpy(videodriver, SDL_GetCurrentVideoDriver(), 4) != '\0' &&
strncasecmp("x11",videodriver,4) == 0 && strncasecmp("x11",videodriver,4) == 0)
SDL_SetRelativeMouseMode(SDL_TRUE) == -1)
mousegrabok = SDL_FALSE; //X11's XGrabPointer not good mousegrabok = SDL_FALSE; //X11's XGrabPointer not good
} }
#endif #endif