Seems to fix the DGA issue. Mouse cursor doesn't get hidden if we're in

DGA because the way we hide it doesn't mesh with Mesa+Glide.  There's a
way to do it properly, but it's more trouble than it's worth for now.
This commit is contained in:
Joseph Carter 2000-05-29 13:42:33 +00:00
parent efb2d99e22
commit 38daae8b5a
2 changed files with 10 additions and 20 deletions

View file

@ -89,6 +89,9 @@ void Cvar_Alias_Get (char *name, cvar_t *cvar);
void Cvar_Set (cvar_t *var, char *value);
void Cvar_SetValue (cvar_t *var, float value);
// sets a CVAR_ROM variable from within the engine
void Cvar_SetROM (cvar_t *var, char *value);
// allows you to change a Cvar's flags without a full Cvar_Get
void Cvar_SetFlags (cvar_t *var, int cvarflags);

View file

@ -461,45 +461,32 @@ IN_Init(void)
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
m_filter = Cvar_Get ("m_filter","0",CVAR_ARCHIVE,"None");
in_dgamouse = Cvar_Get ("in_dgamouse", "0", CVAR_NONE,
"1 if you have DGA mouse support");
if (COM_CheckParm("-nomouse")) return 1;
#ifdef HAVE_DGA
in_dga_mouseaccel = Cvar_Get ("in_dga_mouseaccel","1",CVAR_ARCHIVE,
"None");
in_dgamouse = Cvar_Get ("in_dgamouse", "0", CVAR_ROM,
"1 if you have DGA mouse support");
in_dga_mouseaccel = Cvar_Get ("in_dga_mouseaccel", "1", CVAR_ARCHIVE,
"None");
if (!COM_CheckParm("-nodga"))
{
XGrabKeyboard (x_disp, x_win, True, GrabModeAsync,
GrabModeAsync, CurrentTime);
// XF86DGASetViewPort, XF86DGASetVidPage, and XF86DGADirectVideo's
// XF86DGADirectVideo flag are disabled till someone has a chance to
// figure out what's wrong with them (if anything) --KB
// XF86DGASetViewPort(x_disp, DefaultScreen(x_disp), 0, 0);
XF86DGADirectVideo(x_disp, DefaultScreen(x_disp),
/*XF86DGADirectGraphics|*/
XF86DGADirectMouse|XF86DGADirectKeyb);
// XF86DGASetVidPage(x_disp, DefaultScreen(x_disp), 0);
XWarpPointer(x_disp, None, x_win, 0, 0, 0, 0,
vid.width, vid.height);
// XWarpPointer (x_disp, None, x_win, 0, 0, 0, 0, scr_width,
// scr_height);
// XWarpPointer(x_disp, None, x_win, 0, 0, 0, 0,
// vid.width, vid.height);
XGrabPointer (x_disp, x_win, True, MOUSE_MASK, GrabModeAsync,
GrabModeAsync, x_win, None, CurrentTime);
Cvar_Set (in_dgamouse, "1");
Cvar_SetROM (in_dgamouse, "1");
}
#endif
in_dgamouse = Cvar_Get ("in_dgamouse", "0", CVAR_ROM,
"1 if you have DGA mouse support");
mouse_x = mouse_y = 0.0;
mouse_avail = 1;