Skip to content

Conversation

@DissolveDZ
Copy link

scrolling on windows would return a value 120 times bigger than it should be rather than 1
this pull request just uses .signum() to clamp the range that mouse_wheel().1 would return

@not-fl3
Copy link
Owner

not-fl3 commented Mar 7, 2024

It looks like this 120 comes from some sort of a setting and on other platforms miniquad also is sending unprocessed/unnormalized values from the OS too?

Maybe we should split it, make platform-independent, 0/1 value and also provide platform dependent value?

Also, I am not quite sure how to make it without being a big breaking change for everyone who used to rely on the OS values.

@DissolveDZ
Copy link
Author

I'm not quite sure what the OS values would represent as i never changed much and i was kind of thrown off by it after porting my game to windows

@DissolveDZ
Copy link
Author

if found the following in the official documentation
The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120. This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.

@DissolveDZ
Copy link
Author

so i'm guessing the mouse itself controls this mouse delta value but this would result in inconsistent scrolling across different mouses so you could make this some kind of function like mouse_scroll_delta or smth. like that due to most people not knowing that this is a threshold and not the actual scroll and that it could differ from mouse to mouse

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

Successfully merging this pull request may close these issues.

2 participants