Closed drmfinlay closed 4 years ago
Thanks! I also saw that SetProcessDpiAwarenessContext() it is recommended but wasn't able to get that to work (the constants to pass in are defined as macros in a header file in an opaque way). This looks good to me.
Yes, I saw the same header file. Odd way of doing things.
I'll merge this now. Thanks for figuring out how to do this :+1:
Closes #289.
This is @wolfmanstout's patch (https://github.com/dictation-toolbox/dragonfly/commit/c3a1b1e306a720e5b2e1ad3b8c5c3d4e1e30c668) with a safety check for older versions of Windows, plus some logging if setting the process DPI awareness fails (
E_INVALIDARG
andE_ACCESSDENIED
are handled). I have also updated the relevant FAQ added in 4e5f0a9.Microsoft's documentation indicates that the Windows 10
SetProcessDpiAwarenessContext()
function is recommended instead ofSetProcessDpiAwareness()
in situations where the DPI awareness cannot be set in the application manifest. I don't understand how to use that function though, so this will do.@LexiconCode Regarding the issues you mentioned in #289, let me know if this works properly. I think it should be fine.