-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Minor cleanups to wasm driver #5790
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
Conversation
sdassow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks good to me.
andydotxyz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to get tidy-ups, but I think it cuts out code that should be fixed not removed.
| modifier := desktopModifier(mods) | ||
| var button desktop.MouseButton | ||
| rightClick := false | ||
| if runtime.GOOS == "darwin" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about removing this code - although it was not executing it has purpose.
What we really need to do is move it to a runtime check of the client not the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. I thought it was just working around inconsistencies in GLFW. Will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it up and also noticed that support for mouse button key 3 was missing compared to desktop. Added that in as well.
|
|
||
| switch btn { | ||
| case glfw.MouseButton1: | ||
| if rightClick { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, ctrl+left on macOS should be right
andydotxyz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice tidies thanks
Description:
This removes some GOOS checks (likely leftovers from desktop driver) which were never going to be true, makes sure we clean up the pending function to run and also includes some minor cleanups.
Checklist: