Don't batch mouse motion for Sunshine
This commit is contained in:
parent
8a0142bd0f
commit
9c15cceee7
3 changed files with 33 additions and 17 deletions
|
|
@ -181,14 +181,26 @@ void SdlInputHandler::handleMouseMotionEvent(SDL_MouseMotionEvent* event)
|
|||
return;
|
||||
}
|
||||
|
||||
// Batch until the next mouse polling window or we'll get awful
|
||||
// input lag everything except GFE 3.14 and 3.15.
|
||||
if (m_AbsoluteMouseMode) {
|
||||
updateMousePositionReport(event->x, event->y);
|
||||
if (m_BatchMouseMotion) {
|
||||
// Batch until the next mouse polling window or we'll get awful
|
||||
// input lag everything except GFE 3.14 and 3.15.
|
||||
if (m_AbsoluteMouseMode) {
|
||||
updateMousePositionReport(event->x, event->y);
|
||||
}
|
||||
else {
|
||||
SDL_AtomicAdd(&m_MouseDeltaX, event->xrel);
|
||||
SDL_AtomicAdd(&m_MouseDeltaY, event->yrel);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SDL_AtomicAdd(&m_MouseDeltaX, event->xrel);
|
||||
SDL_AtomicAdd(&m_MouseDeltaY, event->yrel);
|
||||
// On Sunshine, we can send input immediately
|
||||
if (m_AbsoluteMouseMode) {
|
||||
updateMousePositionReport(event->x, event->y);
|
||||
flushMousePositionUpdate();
|
||||
}
|
||||
else {
|
||||
LiSendMouseMoveEvent(event->xrel, event->yrel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue