Controllable (Fabric)

Controllable (Fabric)

1M Downloads

Inconsistent L1/R1 hotbar scrolling

Ricket opened this issue ยท 2 comments

commented

When I press L1 and R1, it's about 80-90% of the time the hotbar changes, but sometimes it does not. Especially if I'm spamming the buttons to go several slots down the hotbar, I'll have to press one or two more times to get there. And if I just quickly single press, sometimes it moves slots, sometimes it doesn't. I noticed this within minutes of using the mod.

This is on Steam Deck, so I remapped L1/R1 instead to be mouse scroll up/down, and now 100% of the time the hotbar changes slots as expected. All the same tests as before, the hotbar changes exactly with my button presses.

I'm happy with this workaround but it seems like the mod could be improved with the button recognition.

commented

All buttons are processed exactly the same, so if R1/L1 are having problems then all buttons would also have similar issues. This could be something to do with your configuration, considering I've never had a report like this before. I also don't have a Steam Deck on hand, so I recommend that you try a isolated test with only this mod installed.

Can you list the MC version, mod version, mods installed, and forge version?

commented

Minecraft 1.16.5, modpack Enigmatica 6: Expert 1.5.1, Forge-1.16.5-36.2.39. Playing with a remote server.

Since it is in Steam Deck, I have FPS limit set to 40. Average FPS is also around 40. But I think Controllable input polling is tied to client tick rate which is 20 Hz, same as the server tick rate, right?

It looks like GLFW only allows polling, not a buffered / event-driven input. I'm thinking 20/s is just too low of frequency to reliably catch a brief button press & release. I think it's only really noticeable on the shoulder buttons because there's an expectation of # of presses. For example you're on the first slot of the hotbar and you want to move to the 4th, so you rapidly press R1 three times, if you press it too rapidly/briefly and it doesn't catch the GLFW poll, then the hotbar only moves over twice and it's jarring. But the same thing isn't such an issue with other buttons like jump or swing sword, because you tend to just press & hold them a little longer, since you're not pressing them rapidly or expecting a specific number of actions.

Since GLFW only allows polling, maybe the only solution is to poll more frequently. I wonder if the polling could be separated to its own thread so it's not tied to a tick rate.