Repository navigation
[rcore][Emscripten] Convert emscripten wheel scroll to glfw units - #6417
Merged
Merged
Conversation
Owner
|
@andzdroid thanks for the review... out of curiosity, why is this conversion required and why those magic numbers? |
Contributor
Author
|
rcore_web does the same conversion through emscripten's glfw layer: https://github.com/emscripten-core/emscripten/blob/main/src/lib/libglfw.js#L601 I copied the numbers from emscripten: https://github.com/emscripten-core/emscripten/blob/main/src/lib/libbrowser.js#L316 Now this backend does the same conversion that is done in rcore_web, and the units work better for glfw (so scrolling should roughly work the same as the desktop platform). For why these numbers specifically, this is the explanation from emscripten (essentially no real reason, these values just feel right): emscripten-core/emscripten#7968 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.