mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-27 13:50:55 +00:00
small fixes
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1128 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
996fd0b84e
commit
1221d62d09
2 changed files with 7 additions and 14 deletions
|
@ -253,12 +253,11 @@ pRegisterRawInputDevices _RRID;
|
||||||
|
|
||||||
mouse_t *rawmice;
|
mouse_t *rawmice;
|
||||||
int rawmicecount;
|
int rawmicecount;
|
||||||
int usingindividualmice;
|
|
||||||
RAWINPUT *raw;
|
RAWINPUT *raw;
|
||||||
int ribuffersize;
|
int ribuffersize;
|
||||||
|
|
||||||
cvar_t in_rawinput = {"in_rawinput", "0"};
|
cvar_t in_rawinput = {"in_rawinput", "0"};
|
||||||
cvar_t in_rawinput_system = {"in_rawinput_combine", "0"};
|
cvar_t in_rawinput_combine = {"in_rawinput_combine", "0"};
|
||||||
cvar_t in_rawinput_rdp = {"in_rawinput_rdp", "0"};
|
cvar_t in_rawinput_rdp = {"in_rawinput_rdp", "0"};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -974,7 +973,6 @@ void IN_RawInput_Init(void)
|
||||||
|
|
||||||
rawmicecount = 0;
|
rawmicecount = 0;
|
||||||
rawmice = NULL;
|
rawmice = NULL;
|
||||||
usingindividualmice = 1;
|
|
||||||
raw = NULL;
|
raw = NULL;
|
||||||
ribuffersize = 0;
|
ribuffersize = 0;
|
||||||
|
|
||||||
|
@ -995,9 +993,6 @@ void IN_RawInput_Init(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_rawinput_system.value) // use system mouse (cvar)
|
|
||||||
usingindividualmice = 0;
|
|
||||||
|
|
||||||
// Loop through all devices and count the mice
|
// Loop through all devices and count the mice
|
||||||
for (i = 0, mtemp = 0; i < inputdevices; i++)
|
for (i = 0, mtemp = 0; i < inputdevices; i++)
|
||||||
{
|
{
|
||||||
|
@ -1245,7 +1240,7 @@ void IN_Init (void)
|
||||||
|
|
||||||
#ifdef USINGRAWINPUT
|
#ifdef USINGRAWINPUT
|
||||||
Cvar_Register (&in_rawinput, "Input stuff");
|
Cvar_Register (&in_rawinput, "Input stuff");
|
||||||
Cvar_Register (&in_rawinput_system, "Input stuff");
|
Cvar_Register (&in_rawinput_combine, "Input stuff");
|
||||||
Cvar_Register (&in_rawinput_rdp, "Input stuff");
|
Cvar_Register (&in_rawinput_rdp, "Input stuff");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1613,7 +1608,7 @@ void IN_MouseMove (usercmd_t *cmd, int pnum)
|
||||||
#ifdef USINGRAWINPUT
|
#ifdef USINGRAWINPUT
|
||||||
if (rawmicecount)
|
if (rawmicecount)
|
||||||
{
|
{
|
||||||
if (!usingindividualmice && pnum == 0)
|
if (in_rawinput_combine.value && pnum == 0)
|
||||||
{
|
{
|
||||||
// not the right way to do this but it'll work for now
|
// not the right way to do this but it'll work for now
|
||||||
int x;
|
int x;
|
||||||
|
@ -1776,16 +1771,14 @@ void IN_RawInput_MouseRead(HANDLE in_device_handle)
|
||||||
tbuttons = raw->data.mouse.ulRawButtons & RI_RAWBUTTON_MASK;
|
tbuttons = raw->data.mouse.ulRawButtons & RI_RAWBUTTON_MASK;
|
||||||
for (j=6 ; j<rawmice[i].numbuttons ; j++)
|
for (j=6 ; j<rawmice[i].numbuttons ; j++)
|
||||||
{
|
{
|
||||||
if ( (tbuttons & (1<<j)) &&
|
if ( (tbuttons & (1<<j)) && !(rawmice[i].buttons & (1<<j)) )
|
||||||
!(rawmice[i].buttons & (1<<j)) )
|
|
||||||
{
|
{
|
||||||
Key_Event (K_MOUSE1 + j, true);
|
Key_Event (K_MOUSE1 + j, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !(tbuttons & (1<<j)) &&
|
if ( !(tbuttons & (1<<j)) && (rawmice[i].buttons & (1<<j)) )
|
||||||
(rawmice[i].buttons & (1<<j)) )
|
|
||||||
{
|
{
|
||||||
Key_Event (K_MOUSE1 + j, false);
|
Key_Event (K_MOUSE1 + j, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,7 +529,7 @@ void PF_R_AddEntity(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||||
ent.flags |= Q2RF_EXTERNALMODEL;
|
ent.flags |= Q2RF_EXTERNALMODEL;
|
||||||
if (i & CSQCRF_DEPTHHACK)
|
if (i & CSQCRF_DEPTHHACK)
|
||||||
ent.flags |= Q2RF_DEPTHHACK;
|
ent.flags |= Q2RF_DEPTHHACK;
|
||||||
if (i * CSQCRF_ADDATIVE)
|
if (i & CSQCRF_ADDATIVE)
|
||||||
ent.flags |= Q2RF_ADDATIVE;
|
ent.flags |= Q2RF_ADDATIVE;
|
||||||
//CSQCRF_USEAXIS is below
|
//CSQCRF_USEAXIS is below
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue