mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-29 15:23:02 +00:00
add desti's nodga patch with modifications to control the grabbing of kb and
mouse input
This commit is contained in:
parent
acace1d0eb
commit
1d3935a903
1 changed files with 12 additions and 1 deletions
|
@ -70,6 +70,7 @@ cvar_t *m_filter;
|
||||||
cvar_t *in_dgamouse;
|
cvar_t *in_dgamouse;
|
||||||
#ifdef HAVE_DGA
|
#ifdef HAVE_DGA
|
||||||
cvar_t *in_dga_mouseaccel;
|
cvar_t *in_dga_mouseaccel;
|
||||||
|
cvar_t *in_nodga_grab;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static qboolean mouse_avail;
|
static qboolean mouse_avail;
|
||||||
|
@ -432,9 +433,19 @@ IN_Init(void)
|
||||||
"1 if you have DGA mouse support");
|
"1 if you have DGA mouse support");
|
||||||
in_dga_mouseaccel = Cvar_Get ("in_dga_mouseaccel", "1", CVAR_ARCHIVE,
|
in_dga_mouseaccel = Cvar_Get ("in_dga_mouseaccel", "1", CVAR_ARCHIVE,
|
||||||
"None");
|
"None");
|
||||||
|
in_nodga_grab = Cvar_Get ("in_nodga_grab", "0", CVAR_ROM,
|
||||||
|
"grab keyboard and mouse input when using -nodga");
|
||||||
|
|
||||||
if (!COM_CheckParm("-nodga"))
|
if (COM_CheckParm("-nodga"))
|
||||||
{
|
{
|
||||||
|
if (in_nodga_grab->value) {
|
||||||
|
XGrabKeyboard (x_disp, x_win, True, GrabModeAsync,
|
||||||
|
GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
|
XGrabPointer (x_disp, x_win, True, MOUSE_MASK, GrabModeAsync,
|
||||||
|
GrabModeAsync, x_win, None, CurrentTime);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
XGrabKeyboard (x_disp, x_win, True, GrabModeAsync,
|
XGrabKeyboard (x_disp, x_win, True, GrabModeAsync,
|
||||||
GrabModeAsync, CurrentTime);
|
GrabModeAsync, CurrentTime);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue