Commit 92237d41 authored by Piyush Aggarwal's avatar Piyush Aggarwal 🎮
Browse files

plugins/mousepad: wait for a microsecond to allow interpolation

parent c00ea120
Pipeline #63798 passed with stage
in 4 minutes and 26 seconds
......@@ -8,6 +8,8 @@
#include <QCursor>
#include <QDebug>
#include <chrono>
#include <thread>
#include <Windows.h>
......@@ -237,9 +239,9 @@ bool WindowsRemoteInput::handlePacket(const NetworkPacket& np)
} else { //Is a mouse move event
POINT point;
if (GetCursorPos(&point)) {
return SetCursorPos(point.x + (int)dx, point.y + (int)dy);
} else {
return false;
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 true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment