[client] spice: general improvements to cursor warp logic

Previously only up to two pending warp requests were possible, this
changes this so that additional warps can be queued if the cursor's
delta has moved more then 50px between each warp request.

The old code also had an error where it would null out any additional
movement since the warp was requested, but before it was processed, this
has been corrected.
This commit is contained in:
Geoffrey McRae
2021-01-06 22:11:28 +11:00
parent 271276a0a9
commit 9b309db964
2 changed files with 74 additions and 54 deletions

View File

@@ -210,6 +210,9 @@ struct CursorState
/* the last local X & Y positions */
SDL_Point last;
/* the delta since the last warp to CX/CY */
SDL_Point delta;
/* the scale factors for the mouse sensitiviy */
int sens;
float sensX, sensY;