Skip to content

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

Merged
stephengold merged 3 commits into
masterfrom
sgold/issue-1745
Jan 17, 2022
Merged

GlfwMouseInput: scale mouse coords only if Retina AppSetting is true#1746
stephengold merged 3 commits into
masterfrom
sgold/issue-1745

Conversation

@stephengold

Copy link
Copy Markdown
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
Copy Markdown
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.

@richardTingle richardTingle left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

bob0bob commented Jan 18, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

4 participants