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

Fallback to simpler logic when trying to get DPI from monitor and failing #1600

Merged
merged 2 commits into from
Apr 21, 2021

Conversation

corfe83
Copy link
Contributor

@corfe83 corfe83 commented Apr 19, 2021

This fixes a crash on at least one of my customer's machines. I don't have access to the machine, so I don't know why it's failing.

Instead of crashing, just falls back to other DPI.

@hajimehoshi
Copy link
Owner

hajimehoshi commented Apr 19, 2021

Thanks!

  1. Could you file the bug first?
  2. Could you add a comment about this bug with the filed issue?

@hajimehoshi hajimehoshi self-requested a review April 19, 2021 18:32
@hajimehoshi
Copy link
Owner

hajimehoshi commented Apr 19, 2021

The comment will be like:

// monitorFromRect can fail in some environments (#1602)

// getDpiForMonitor can fail in some environments (#1602)

@hajimehoshi
Copy link
Owner

friendly ping

@corfe83
Copy link
Contributor Author

corfe83 commented Apr 20, 2021

Thanks for feedback, I've filed a bug and added the comments: #1612

Copy link
Owner

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@hajimehoshi hajimehoshi merged commit d24313e into hajimehoshi:master Apr 21, 2021
hajimehoshi pushed a commit that referenced this pull request Apr 21, 2021
hajimehoshi pushed a commit that referenced this pull request Apr 21, 2021
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.

2 participants