Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth scrolling speed difference at higher FPS #143

Open
r37r05p3C7 opened this issue Mar 8, 2024 · 1 comment
Open

Smooth scrolling speed difference at higher FPS #143

r37r05p3C7 opened this issue Mar 8, 2024 · 1 comment

Comments

@r37r05p3C7
Copy link
Contributor

https://f95zone.to/threads/f95checker-willyjl.44173/post-13157234

Mouse wheel scroll Up/Down seems to be asymmetrical with Up being ~x2 more powerful than Down when Smooth scrolling is enabled.

Played around with the Vsync option, and at 1:1 of 165FPS the up scroll is significantly stronger, while at 1:10 of ~16FPS the difference between scrolls is still there but becomes negligible.

@Willy-JL
Copy link
Owner

Willy-JL commented Sep 4, 2024

seems like floating point error, probably in imgui or pyimgui bindings... even if you disable scrooth scrolling and set scroll multiplier to a float-unfriendly value like 0.99 or 0.33 and spam scroll up and down, it slowly but surely drifts upwards. smooth scrolling just amplifies this since its even more unfriendly values for floats

in python land floats seem fine, i tried replacing delta time with 0.016 i nthe smooth scrolling code for consistency and printing the resulting values of imgui.io.mouse_wheel, values are equal for up and down when printed by python. maybe its a situation of "python uses double but imgui uses float"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants