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