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

sdl2: fix retina mouse coordinates #822

Merged
merged 4 commits into from
Jul 7, 2023
Merged

Conversation

seanfarley
Copy link
Collaborator

Now that lem has nice retina fonts, let's also add the same for mouse events.

These methods take a raw (x,y) input (in pixels) from sdl2 and multiply
it by the dpi scale (usually 2 for retina screens, otherwise 1) and then
multiply that by the char-{width,height}.
Previously, retina resolution was added to lem for rendering its fonts.
This accidentally skipped over doing the same scaling calculation for
the mouse coordinates so we fix that here.
@cxxxr
Copy link
Member

cxxxr commented Jul 7, 2023

Thank you so much!

@cxxxr cxxxr merged commit e4c30c2 into lem-project:main Jul 7, 2023
@seanfarley seanfarley deleted the retina-fix branch July 7, 2023 16:34
@cxxxr cxxxr mentioned this pull request Jul 11, 2023
6 tasks
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.

None yet

2 participants