getPhysicalPixelScaleFactor incorrect value on first paint (VST3 in Reaper)

Hi!

The value of getPhysicalPixelScaleFactor is 1 on the first call to paint in my plugin which results in the plugin drawing itself smaller than it should (i.e. not filling the space provided by Reaper in this case) but on subsequent calls to paint it is the correct value 1.5.

Is this a host issue or something JUCE can fix or do I just need to force a repaint after a while?
Is there even a JUCE way to get notified of DPI scaling changes? (Although it has not changed in the system in this case).

JUCE 6.0.8
Windows 10 fully up to date with 150% DPI scaling
Visual Studio 16.9.4
Reaper 6.28

Thanks!
James

1 Like

Some more info on this:

I noticed that this issue only appears with an OpenGL context attached to the top level component.

Without OpenGL then the first call to paint has the correct pixel scale factor.

I’ve tried this with an AMD and an Nvidia card with the same results.

1 Like

Hi @phraemer, did you find a way to fix this? I have the same problem. I’m still using juce 6.0.8.

Hi matteo. In the end we took a different approach which repaints more often that just avoided the issue entirely.

1 Like