mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Useless cleanup of a function I saw when investigating a problem
git-svn-id: https://svn.eduke32.com/eduke32@6773 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
be5cf71c83
commit
9ea4f8f802
1 changed files with 8 additions and 9 deletions
|
@ -111,23 +111,22 @@ void CONTROL_FreeMouseBind(int i)
|
|||
#ifndef __ANDROID__
|
||||
static void CONTROL_GetMouseDelta(void)
|
||||
{
|
||||
int32_t x,y;
|
||||
vec2_t pos;
|
||||
|
||||
MOUSE_GetDelta(&x, &y);
|
||||
MOUSE_GetDelta(&pos.x, &pos.y);
|
||||
|
||||
if (CONTROL_SmoothMouse)
|
||||
{
|
||||
static int32_t lastx = 0, lasty = 0;
|
||||
static vec2_t last;
|
||||
|
||||
CONTROL_MouseAxes[0].analog = (int32_t)(((x + lastx) / 2.0f) * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (int32_t)((((y + lasty) / 2.0f) * 4.0f * CONTROL_MouseSensitivity) * 2.0f);
|
||||
lastx = x;
|
||||
lasty = y;
|
||||
CONTROL_MouseAxes[0].analog = (int32_t)(((float)(pos.x + last.x) / 2.0f) * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (int32_t)(((float)(pos.y + last.y) / 2.0f) * 4.0f * CONTROL_MouseSensitivity * 2.0f);
|
||||
last = pos;
|
||||
return;
|
||||
}
|
||||
|
||||
CONTROL_MouseAxes[0].analog = (int32_t)(x * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (int32_t)((y * 4.0f * CONTROL_MouseSensitivity) * 2.0f);
|
||||
CONTROL_MouseAxes[0].analog = (int32_t)(pos.x * 4.0f * CONTROL_MouseSensitivity);
|
||||
CONTROL_MouseAxes[1].analog = (int32_t)(pos.y * 4.0f * CONTROL_MouseSensitivity * 2.0f);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue