Open LoweloDev opened 9 months ago
@LoweloDev @mxrlkn I think this issue maybe is related https://github.com/mxrlkn/mouselock/issues/16#issue-2022185348
@LoweloDev @mxrlkn I think this issue maybe is related #16 (comment)
Certainly sounds like it. Didn't look at the code yet but what you said would perfectly describe what I observed, I think.
EDIT: With an MX Master 3, a G502 (not hero) and a very old Performance MX it is apparently not reproducible btw. I could only reproduce it with G Pro Wireless and Pro X Superlight so far. Peronally running out of mouses by now lmao
Edit2: Okay I think the problem is the polling rate and the amount of events that are sent by 1000hz polling rate. Unfortunately event 125hz seems to be too much. I just don't understand why I didn't seem to have the problem with the G502 then as its polling rate is most definitely > 125hz. I will test that again. My MX Master 3 is capped at max. 125hz and default apparently it even runs on 90hz.
Edit: @ontimond @mxrlkn
Welp. I cloned the repo fooled around in swift and c. Even tried some stuff with the help of copilot. What I learned:
You can either use the higher level event tap thing which is also used in this application or you can use the lower level one. However, with the higher level one you have one of 6-7 options:
There is however another implementation that I did not try yet which is this: https://stackoverflow.com/a/40922095
Yeah I tried a lot of different things but in the end I could only get it to work by constantly updating the position.
This has worked on all my mice, with no jittering.
They are all set to 1000hz polling rate in Windows, which I believe gets carried over when I use them on MacOS. But I'm not 100% sure.
Try and check activity monitor when you test. If my CPU is overloaded I have found that I get some jittering. It uses quite a bit CPU. Maybe higher polling rate creates more CPU usage? I have an M1 mac
I'm uncertain about my polling rate, but I believe it exceeds 1000Hz, likely at least 2500Hz. This implies that the process operates on a linear basis according to the mouse polling rate.
Yeah I tried a lot of different things but in the end I could only get it to work by constantly updating the position.
I'm curious to know about the methods you've explored
The methods @LoweloDev mentioned. I'm not well versed in swift or c so I can't really say if it's possible or not. If you want to explore more, I found the Godot source code interesting: https://github.com/godotengine/godot/blob/51a00c2855009ce4cd6475c09209ebd22641f448/platform/osx/display_server_osx.mm#L1087
Hi guys, I recently got a Superlight 2 and seem to be suffering from the same problem. Whenever the polling rate is set to anything over 250hz the cursor starts going crazy.
Did you find a solution to this? @LoweloDev
Update: I figured out what the problem is. The problem is the polling rate and the amount of events sent. 250hz is the maximum I could get running without issues using the method implemented by @mxrlkn.
I may or may not look for a better solution than to downgrade my mouses polling rate e.g. according to https://stackoverflow.com/a/40922095 wine developers impl. of mouse capture. But I am probably going to buy a gaming pc soon TM anyways so... probably not.
EDIT: With an MX Master 3, a G502 (not hero) and a very old Performance MX it is not reproducible btw. I could only reproduce it with G Pro Wireless and Pro X Superlight so far. Peronally running out of mouses by now lmaoSteps to reproduce:install OS Ventura 13.1use mouselockstart League of legends using G pro wireless or Pro X Superlightproduce high apm with mouse like clicking around or, simpler way to cause teleportation -> hold left click and drag your mouse around.This happens especially while holding left click but also happens if having a high clickrate on rightclick ingame combined with movement. It's like the tracking just stops frequently.Doesnt matter if Linear Mouse or GHub is used parallel to mouselock.