obs-vst: Get devicePixelRatio from correct device#10212
obs-vst: Get devicePixelRatio from correct device#10212Tom-Evers wants to merge 1 commit intoobsproject:masterfrom
Conversation
Fixes small mistake in 542cb87
RytoEX
left a comment
There was a problem hiding this comment.
Please be sure to select an option under "Types of changes" and fill out the checklist as appropriate in the PR template. Please also make sure that your commit message and PR title conform with our Commit Guidelines.
I cannot change the commit message anymore (without force pushing anyway). I don't want to sound like a complete a-hole, but I really don't have time to spend on this. Could someone just check if this works and put it in the next beta if it does? |
Force pushing to fix commit messages is fine.
I don't use VSTs and I don't have multiple displays, so I cannot validate this. Someone else will have to do it, which occurs on their own free time when they can. |
|
VST3 support is on the horizon for OBS, and we will be sunsetting the VST2 implementation in favor of the modern standards. Testing against this PR is welcome: #12752 |
Fixes small mistake in 542cb87
Description
Should fix a small mistake in 542cb87 by taking the scaling factor (dpi) from the display the widget is on, instead of the main display
Motivation and Context
The old commit took the scale factor with devicePixelRatioF, but that seems to be the scale factor of the main monitor.
Which is not necessarily the same as the scale factor the VST plugin (widget) is on.
And this indeed causes a problem in the following situation
Expected behaviour:
Observed behaviour:
Here is an image of the consequences (note the cut-off contents on the right and bottom sides):

How Has This Been Tested?
It hasn't.
Types of changes
I'm calling a function on a specific window.
Checklist:
This is my first ever pull request, no idea what to do or how to do these things. I just wanted to fix a bug.