Legacy4J

Legacy4J

192k Downloads

[Bug/Glitch] Cursor snapping breaks at certain frame rates

Cjnator38 opened this issue ยท 13 comments

commented

Legacy4J Version

1.21-1.7.2

Mod Loader Version

Fabric Loader 0.15.11

Bug/Glitch Occurrence Context

For some reason, using Sodium with Legacy4J causes the cursor snapping to stop working properly

Video with Sodium
Video without Sodium

Crash Report

No response

What happened wrong?

Cursor snapping is clearly trying to work, but Sodium somehow causes the cursor to unsnap from an inventory slot

commented

For me it's more about frametime than framerate

commented

For me it only appears on my Steam Deck. The cursor also seems to have trouble with moving right/down with xaero's world map open

commented

Could be a Linux specific issue then? I don't currently have a Windows machine to test on at the moment so I can't really confirm

commented

If it's the Sodium that is somehow causing this, test to see if limiting the FPS stops this from occurring.

commented

So it does seem like that's what fixes it. The issue happens when the frame rate is limited to anything above 60 fps (enabling VSync on 60 hz display doesn't fix it)

commented

On a bare L4J instance, the issue does technically still occur, but it's a lot less frequent. With Sodium, its pretty much impossible to snap the cursor without using the d-pad

commented

So it does seem like that's what fixes it. The issue happens when the frame rate is limited to anything above 60 fps (enabling VSync on 60 hz display doesn't fix it)

While that fixes the weird behaviour in xaero's world map, the cursor still struggles in inventory on my Steam deck. I'll test if it also appears on my pc with linux installed. On that same pc with windows it doesn't appear, so maybe it IS linux-specific?

commented

can confirm cursor acts as normal on my windows pc with sodium and l4j at 120hz. Might be linux specific.

commented

Okay, I tested it on my pc, on a live installation of Manjaro. When at 60 fps, the cursor works as intented. But when over or under 60 fps, the cursor suddenly "gives up". So it seems to be 1. a linux specific issue, and 2. a framerate issue. When not at EXACTLY 60 fps, the cursor's snapping breaks. And it only occurs with sodium installed, as said earlier

commented

idk if this was mentioned already but the cursor's movement is generally broken at higher frame rates. Also a Linux specific issue

Video

commented

here are some more examples using a more recent version of l4j

Here the FPS is uncapped, Interface Sensitivity set to 130%:

Video_2024-08-19_21-18-41.mp4

Here the FPS is capped using VSync only, then 60 fps Max Framerate is added. I changed Interface Sensitivity to around 100% here:

Video_2024-08-19_21-19-43.mp4
commented

still happening?

commented

I'll close this issue, as no one updated about the state of this.