Revert "plugins/mousepad: wait for a microsecond to allow interpolation"

This reverts the microsec delay as it introduces a lot of aggregated delay in mouse movement.
This commit is contained in:
Piyush Aggarwal 2021-08-09 03:06:56 +05:30
parent 3e1e9f4410
commit a7a58cc8c6

View file

@ -8,8 +8,6 @@
#include <QCursor> #include <QCursor>
#include <QDebug> #include <QDebug>
#include <chrono>
#include <thread>
#include <Windows.h> #include <Windows.h>
@ -239,9 +237,9 @@ bool WindowsRemoteInput::handlePacket(const NetworkPacket& np)
} else { //Is a mouse move event } else { //Is a mouse move event
POINT point; POINT point;
if (GetCursorPos(&point)) { if (GetCursorPos(&point)) {
SetCursorPos(point.x + (int)dx, point.y + (int)dy); return SetCursorPos(point.x + (int)dx, point.y + (int)dy);
// wait for a microsecond here to allow Windows to interpolate } else {
std::this_thread::sleep_for(std::chrono::microseconds(1)); return false;
} }
} }
return true; return true;