diff --git a/src/common/engine/d_event.cpp b/src/common/engine/d_event.cpp index dd23c6e0d..f851bb49e 100644 --- a/src/common/engine/d_event.cpp +++ b/src/common/engine/d_event.cpp @@ -52,7 +52,6 @@ event_t events[MAXEVENTS]; CVAR(Float, m_sensitivity_x, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Float, m_sensitivity_y, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) -CVAR(Bool, m_filter, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) //========================================================================== @@ -165,24 +164,11 @@ void D_PostEvent(event_t* ev) void PostMouseMove(int xx, int yy) { - static float lastx = 0, lasty = 0; event_t ev{}; - float x = float(xx) * m_sensitivity_x; - float y = -float(yy) * m_sensitivity_y; + ev.x = float(xx) * m_sensitivity_x; + ev.y = -float(yy) * m_sensitivity_y; - if (m_filter) - { - ev.x = (x + lastx) / 2; - ev.y = (y + lasty) / 2; - } - else - { - ev.x = x; - ev.y = y; - } - lastx = x; - lasty = y; if (ev.x || ev.y) { ev.type = EV_Mouse; diff --git a/src/common/platform/win32/i_input.h b/src/common/platform/win32/i_input.h index 433c1f2c6..643cc65b3 100644 --- a/src/common/platform/win32/i_input.h +++ b/src/common/platform/win32/i_input.h @@ -82,7 +82,6 @@ protected: void ClearButtonState(); int WheelMove[2]; - int LastX, LastY; // for m_filter int ButtonState; // bit mask of current button states (1=down, 0=up) }; diff --git a/src/common/platform/win32/i_mouse.cpp b/src/common/platform/win32/i_mouse.cpp index 4c2673e35..58cac26c2 100644 --- a/src/common/platform/win32/i_mouse.cpp +++ b/src/common/platform/win32/i_mouse.cpp @@ -305,7 +305,6 @@ void I_CheckNativeMouse(bool preferNative, bool eventhandlerresult) FMouse::FMouse() { - LastX = LastY = 0; ButtonState = 0; WheelMove[0] = 0; WheelMove[1] = 0;