Applying PreScale on mickeys directly instead of only on the acceleration curve#72
Applying PreScale on mickeys directly instead of only on the acceleration curve#72systemofapwne wants to merge 1 commit intoAndyFilter:masterfrom
Conversation
|
Thanks for pointing this out. I always have trouble finding issues like this, as I don't use most of the feature the program has to offer, and my synthetic testing without any feeling is quite crude and has proven to miss major bugs at times. Though I recently started running my tests with mouse moving in both axes simulated through Arduino Micro, but I haven't simulated different DPIs yet. I ran these tests now with the old and the fixed code, and it seems to fix the issue quite well!
The
Now everything works perfectly! Now I wonder how this parameter should be represented in the GUI? As currently YeetMouse/gui/FunctionHelper.cpp Lines 338 to 340 in 3ec6e32 Pre-Scale here, but, again that would just scale the curve up and down, if I understand correctly.
What are your thoughts on this? When testing this PR I also found a couple of issues I must have missed (the point I was making earlier, haha). So I'll fix them shortly after merging this PR. Thanks for the contribution! |
There are in principle two ways I can think about representing PreScale:
Either way, the y-axis should not scale (the whole behaviour point of this PR). Scaling y-axis is the job of the sensitivity setting ("post scale"). |


The PreScale parameter should directly act on the mickeys instead of only on the acceleration curve. Only when this applies, one can truely use the prescaler to switch between different DPI mice and reproduce the same mouse cursor speed.
Longer story of "why".
As I am curently writing a leet2yeet converter for deprecating my LEETMOUSE project in favour for YeetMouse, I had a closer look on both code bases.
LEETMOUSE applies a pre-scaler directly on the "mickeys" and then calculates the rate/speed and acceleration from the new "mickeys".
https://github.com/systemofapwne/leetmouse/blob/8919991ecb92f6f7a45390a746d52275281e3247/driver/accel.c#L158-L164
YeetMouse does not transform the "mickeys" but it applies the pre-scaler to the rate/speed and acceleration only.
YeetMouse/driver/accel.c
Lines 221 to 226 in 3ec6e32
This minute difference has the implication, that one cannot easily migrate the same "feel" of lets say a 400 DPI mouse to an 800 DPI mouse by only changing the PreScale parameter. This becomes direcly clear when writing down the math formula of LEET and Yeet:
While both implementations will properly scale the acceleration part in the [...] bracket, the xout mickeys of the 800 DPI mouse will be twice as much on Yeetmouse, since the xin are never scaled down too. One could compensate by scaling down sensitivity the same amount as PreScale but that defies the purpose of PreScale for helping to migrate between different mice with different DPIs.