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

GlfwMouseInput: scale mouse coords only if Retina AppSetting is true #1746

Merged
merged 3 commits into from
Jan 17, 2022

Conversation

stephengold
Copy link
Member

Proposed fix for #1745.

@stephengold stephengold added this to the v3.5.0 milestone Jan 16, 2022
@stephengold stephengold added the bug Something that is supposed to work, but doesn't. More severe than a "defect". label Jan 16, 2022
@stephengold stephengold marked this pull request as draft January 16, 2022 20:38
@stephengold stephengold marked this pull request as ready for review January 16, 2022 21:36
@stephengold
Copy link
Member Author

The fix is somewhat tricky to test. Due to persistent settings and the recent change of default, it's possible to have the Retina flag set to true without knowing it. Also, the default LWJGL (in jme3-examples) is still LWJGL v2.

Copy link
Member

@richardTingle richardTingle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@stephengold
Copy link
Member Author

Thanks for your help @richardTingle and @bob0bob!

@stephengold stephengold merged commit e80871c into master Jan 17, 2022
@stephengold stephengold deleted the sgold/issue-1745 branch January 17, 2022 05:20
stephengold added a commit that referenced this pull request Jan 17, 2022
…1746)

* GlfwMouseInput:  scale mouse coords only if Retina AppSetting is true

* GlfwMouseInput:  some minor code cleanup

* GlfwMouseInput:  check for scaled content in initCurrentMousePosition()
@bob0bob
Copy link
Contributor

bob0bob commented Jan 18, 2022

This fix works for me after getting rid of the "saved" settings, because JME already set it to "true" by default and re-running brought them back, but when I erased the settings, it worked great.

@stephengold
Copy link
Member Author

Thanks, @bob0bob. It looks like this PR will be superseded by #1753 though.

Also, it's integrated into both "master" and "v3.5", so it ought to be closed by now. I wonder why it isn't...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect".
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mouse Coords in LWJGL3 are being multipled by scaling factor on all machines causing coords to be off.
3 participants