fix: ignore warps on modes and shake

This commit is contained in:
Virt 2024-08-25 22:58:55 +02:00
commit 55e8b316ce
14 changed files with 80 additions and 9 deletions

View file

@ -35,12 +35,16 @@ class CDynamicCursors {
/* hook on setCursorSoftware */
void unsetShape();
/* hook on move, indicate that next onCursorMoved is actual move */
void setMove();
private:
SP<CEventLoopTimer> tick;
// current state of the cursor
SModeResult resultMode;
double resultShake;
Vector2D lastPos; // used for warp compensation
SModeResult resultShown;
@ -57,6 +61,9 @@ class CDynamicCursors {
// shake
CShake shake;
/* is set true if a genuine move is being performed, and will be reset to false after onCursorMoved */
bool isMove = false;
// calculates the current angle of the cursor, and changes the cursor shape
void calculate(EModeUpdate type);
};