mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 22:42:07 +00:00
invert mouse again for movement, so that it cancels out the first inversion
This commit is contained in:
parent
a6ff63951f
commit
11f2fc10ea
1 changed files with 21 additions and 4 deletions
|
@ -208,7 +208,10 @@ CVAR (Float, m_forward, 1.f, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|||
CVAR (Float, m_side, 2.f, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
||||
|
||||
int turnheld; // for accelerative turning
|
||||
|
||||
|
||||
EXTERN_CVAR (Bool, invertmouse)
|
||||
EXTERN_CVAR (Bool, invertmousex)
|
||||
|
||||
// mouse values are used once
|
||||
float mousex;
|
||||
float mousey;
|
||||
|
@ -1035,9 +1038,23 @@ bool G_Responder (event_t *ev)
|
|||
break;
|
||||
|
||||
// [RH] mouse buttons are sent as key up/down events
|
||||
case EV_Mouse:
|
||||
mousex = ev->x;
|
||||
mousey = ev->y;
|
||||
case EV_Mouse:
|
||||
if(invertmousex)
|
||||
{
|
||||
mousex = -ev->x;
|
||||
}
|
||||
else
|
||||
{
|
||||
mousex = ev->x;
|
||||
}
|
||||
if(invertmouse)
|
||||
{
|
||||
mousey = -ev->y;
|
||||
}
|
||||
else
|
||||
{
|
||||
mousey = ev->y;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue