mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Implemented DGA-code similar to Fuhquake, works much better.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2954 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0a03e2bc3b
commit
55071c68e4
1 changed files with 15 additions and 8 deletions
|
@ -332,13 +332,20 @@ static void install_grabs(void)
|
||||||
CurrentTime);
|
CurrentTime);
|
||||||
|
|
||||||
#ifdef USE_DGA
|
#ifdef USE_DGA
|
||||||
XF86DGADirectVideo(vid_dpy, DefaultScreen(vid_dpy), XF86DGADirectMouse);
|
// TODO: make this into a cvar, like "in_dgamouse", instead of parameters
|
||||||
dgamouse = 1;
|
// TODO: inform the user when DGA is enabled
|
||||||
#else
|
if (!COM_CheckParm("-nodga") && !COM_CheckParm("-nomdga"))
|
||||||
XWarpPointer(vid_dpy, None, vid_window,
|
{
|
||||||
0, 0, 0, 0,
|
XF86DGADirectVideo(vid_dpy, DefaultScreen(vid_dpy), XF86DGADirectMouse);
|
||||||
vid.width / 2, vid.height / 2);
|
dgamouse = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
XWarpPointer(vid_dpy, None, vid_window,
|
||||||
|
0, 0, 0, 0,
|
||||||
|
vid.width / 2, vid.height / 2);
|
||||||
|
}
|
||||||
|
|
||||||
// XSync(vid_dpy, True);
|
// XSync(vid_dpy, True);
|
||||||
}
|
}
|
||||||
|
@ -399,8 +406,8 @@ static void GetEvent(void)
|
||||||
#ifdef USE_DGA
|
#ifdef USE_DGA
|
||||||
if (dgamouse && old_windowed_mouse)
|
if (dgamouse && old_windowed_mouse)
|
||||||
{
|
{
|
||||||
mouse_x = event.xmotion.x_root;
|
mouse_x += event.xmotion.x_root;
|
||||||
mouse_y = event.xmotion.y_root;
|
mouse_y += event.xmotion.y_root;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue