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

Windows HiDPI support #1547

Closed
baconpaul opened this issue Feb 3, 2020 · 12 comments
Closed

Windows HiDPI support #1547

baconpaul opened this issue Feb 3, 2020 · 12 comments
Labels
Feature Request New feature request JUCE Ex Machina Issue that will likely be fixed by porting Surge to JUCE UI/plugin back-end UI Issues related to UI look&feel Windows Windows related issues
Milestone

Comments

@baconpaul
Copy link
Collaborator

Right now windows in display info always return a backing store density of 1. This means we render to a 96dpi pixel in cscalabalebitmap and some zooms are blurry

We could alternately support the hdpi api and set that scale factor then test in all the hosts and display configurations but I don’t know those apis don’t have those displays and don’t run those hosts! So adding a placeholder issue

@baconpaul baconpaul added the Windows Windows related issues label Feb 3, 2020
@baconpaul baconpaul added this to the Currently Unscheduled milestone Feb 3, 2020
@mkruselj mkruselj added the UI Issues related to UI look&feel label Feb 5, 2020
@mkruselj mkruselj changed the title Windows hdpi support Windows HiDPI support Oct 8, 2020
@mkruselj mkruselj added the Feature Request New feature request label Nov 9, 2020
@Kingston1
Copy link
Contributor

Kingston1 commented Nov 23, 2020

One solution that I have done elsewhere in an unrelated project is initially scale and store all vector to bitmap conversions to relatively large internal size, thus ignoring the initial dpi issue entirely. Then always scale down. This works well but with slight increase in memory footprint.

@baconpaul
Copy link
Collaborator Author

Yeah in 17 we did exactly that with this implementation

@baconpaul
Copy link
Collaborator Author

So I think the correct implementation here would

1: go frame -> hwnd
2: go hwnd -> resolution
3: scale resolution by 100 and return it

rather than simply "return 2"

I think a super-complete implementation would also hop into vstgui.surge/vstgui/lib/platform/windows and modify win32frame so that the WM_DPICHANGED message invalidated you but that's probably more trouble than its worth. So for now I think just a readonly access. Take a look at src/windows/DisplayInfoMac.cpp for an example!

@mkruselj mkruselj added the JUCE Ex Machina Issue that will likely be fixed by porting Surge to JUCE UI/plugin back-end label Jan 21, 2021
@mkruselj
Copy link
Collaborator

JUCE, our savior, deliver us from the pain that is VSTGUI!

@baconpaul
Copy link
Collaborator Author

Yeah you should just try xt. The SVGs render perfectly in mac retina with none of my code for vstgui being used

@mkruselj
Copy link
Collaborator

Oh so it's using 1.0 backing store on non-HiDPI in XT now? I don't see anything changed there in DisplayInfoWin, but I bet it's a matter of finding the right JUCE API and hooking it up there.

@baconpaul
Copy link
Collaborator Author

The juce code path never calls backing store resolution

@mkruselj
Copy link
Collaborator

Oh!

@mkruselj
Copy link
Collaborator

So wait, is this one basically implemented and could be closed simply by virtue of having XT building fine across all platforms (even if it's not completed yet)?

@baconpaul
Copy link
Collaborator Author

Well does XT do the right thing on Windows HDPI?
It does on mac!

@mkruselj
Copy link
Collaborator

It seems to be using backing store 1.0 over here on non-HiDPI, but I suppose I should check on my Surface and report back 🙂

@mkruselj
Copy link
Collaborator

The answer is: yes, yes it does! So closing it ahead of schedule. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature request JUCE Ex Machina Issue that will likely be fixed by porting Surge to JUCE UI/plugin back-end UI Issues related to UI look&feel Windows Windows related issues
Projects
None yet
Development

No branches or pull requests

3 participants