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

DPI API Fixes for Wpf on Windows 7 #2297

Merged
merged 1 commit into from
Aug 28, 2022
Merged

Conversation

hamarb123
Copy link
Contributor

@hamarb123 hamarb123 commented Aug 28, 2022

This commit fixes the crashes I experienced as described in #2295. It makes everything work in my application and it should probably make everything else work too, but imo these APIs are not exposed or checked very well.

@cwensley I'd like to first merge this and then implement a much more thorough fix that will expose only APIs with error checking and fallbacks (i.e. 1 method for get dpi, try set awareness, get awareness, & whatever else is needed) - this would avoid something like this happening in the future with these APIs.

This PR just adds fallbacks to the SystemDpi and IsSystemDpiAware APIs that work on Windows 7.

@cwensley
Copy link
Member

Thanks for the fix! Looks great.

@cwensley cwensley added the bug label Aug 28, 2022
@cwensley cwensley added this to the 2.7.2 milestone Aug 28, 2022
@cwensley cwensley merged commit b77b3bf into picoe:develop Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants